Skip to content

Postgres setup

Damien Bargiacchi edited this page Sep 5, 2020 · 6 revisions

1. Install Postgres

Linux

Install via your package manager (e.g. sudo apt-get install postgresql). Many distros come with postgres already installed. Ensure your version of postgres is at least postgres 9.5.

Mac

Install the Postgres app (recommended) or install the via a package managaer like Homebrew.

If you installed the Postgres app, start it up, then select "Postgres 9.6" and click "Run".

Windows

Use the Windows installer.

2. Create an eve_roster database

Linux

Either this:

$ sudo -u postgres createdb eve_roster

or this:

sudo -u postgres psql -c "CREATE DATABASE eve_roster;"

Then, set a password for the "postgres" postgres user (as opposed to the "postgres" unix user):

sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'secret';"

Mac

If using the Postgres app, it's recommended that you add /Applications/Postgres.app/Contents/Versions/latest/bin to your $PATH.

If you did, or if you installed via Homebrew, then see the Linux instructions above. If you didn't, open the Postgres app and double-click on any of the existing databases (e.g. "template1" or "postgres" or "<your_username>"). This should open a psql session with that database. From there, see the Windows instructions, below.

Windows

Open the psql interface and run the following (don't forget the semicolon!):

CREATE DATABASE eve_roster;
Clone this wiki locally