Zuerst führt installiert ihr postgres:
sudo apt-get update
sudo apt-get install postgresql
Dann startet ihr die Datenbank:
sudo services postgresql start
Dann müsst ihr ein Passwort für den Benuzter Postgres festlegen. Dafür öffnet ihr zunächst die Postgres Konsole und gibt danach ein paar Befehle ein:
sudo -u postgres psql
, dann in der Konsole:
\password postgres
legt ein Passwort fest, dann:
\q
um die Konsole wieder zu beenden.
Dann müsst ihr noch das Format der Datenbank ändern. Dafür einfach folgende Zeilen komplett ins Terminal kopieren (ihr werden nach eurem Passwort gefragt was ihr oben festgelegt habt):
echo <<EOT | psql -U postgres -p 5432 -h localhost --password postgres
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
EOT
Denkt daran, die config/config.exs
Datei zu bearbeiten und da postgres
als Usern und das von euch festgelegt Passwort als Passwort einzutragen.