Back to Install Table of Contents
$ sudo apt-get install python-psycopg2
$ sudo apt-get install python-dev
$ sudo apt-get install postgresql-client
$ sudo apt-get install postgresql postgresql-contrib
$ sudo -u postgres psql postgres
postgres=# \password postgres
(NOTE: We recommend using a very simple password like "123" since it is just local development)
postgres=# \q
$ sudo -u postgres createdb WeVoteServerDB
See here for more detailed instructions
We recommend installing pgAdmin 4 as a WYSIWYG database administration tool. NOTE: You may need to turn off the restriction in "Security & Privacy" on "unidentified developers" to allow this tool to be installed. See: http://blog.tcs.de/program-cant-be-opened-because-it-is-from-an-unidentified-developer/
In pgadmin add a server. You can use your sign in name as the server name.
Open this file:
$ sudo vi /etc/postgres/9.6/main/pg_hba.conf
Change the line:
# Database administrative login by Unix domain socket
local all postgres peer
to
# Database administrative login by Unix domain socket
local all postgres trust
Now you should reload the server configuration changes and connect pgAdmin 4 to your PostgreSQL database server.
$ sudo /etc/init.d/postgresql reload
Open pgAdmin 4 and navigate to:
Server Groups > Servers
-
Right-click on "Servers" and choose "Create > Server"
-
Name: WeVoteServer
-
Switch to "Connection" tab
3a) Host name: localhost
3b) Port: 5432
3c) Maintenance database: postgres
3d) User name: postgres
If you do not see "WeVoteServerDB" in PGAdmin, try this command from your terminal window:
$ sudo -u postgres createdb WeVoteServerDB
NEXT: 2. Get WeVoteServer Code from Github