Showing posts from May, 2017

How to install Postgresql-9.6 and PostGIS-2.3 on Ubuntu 17.04 (Zesty Zapus) in six easy steps (updated 31-05-2017).

Install Ubuntu 17.04 (Zesty Zapus)
1.check your Ubuntu version:-

lsb_release -a

Install Postgresql
2.On the server or your PC (Terminal):-

sudo apt-get update
sudo apt-get install -y postgresql postgresql-contrib

Create a database and a user for access
Replace DATABASE_NAME_HERE and USER_NAME_HERE with the values you want to use.
# this will prompt you for a database password...also note the capital letter 'O' not number '0' (zero) below:-

3.sudo -u postgres createuser -P USER_NAME_HERE
sudo -u postgres createdb -O USER_NAME_HERE DATABASE_NAME_HERE

Test Connection to Postgresql

Postgresql will ask you for your password. Then you should see the following:


To exit type:-


To add PostGIS-2.3 support to the database
5.sudo apt-get install -y postgis postgresql-9.6-postgis-2.3
# typing 'postgresql-9.5' instead of postgresql-9.6 above will fail.

sudo -u postgres psql -c "CREATE EXTENSION po…