Posts

Showing posts from May, 2015

How to install Postgresql-9.3.5/9.4 and PostGIS-2.1 on Ubuntu 15.04 in six easy steps.

Install Ubuntu 15.04 (Vivid Vervet) 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 4. psql -h localhost -U USER_NAME_HERE DATABASE_NAME_HERE Postgresql will ask you for your password. Then you should see the following: psql (9.3.5) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. DATABASE_NAME_HERE => To exit type:- \q To add PostGIS-2.1 support to the database 5. sudo apt-