Showing posts from November, 2018

How to install Postgresql-10 and PostGIS-2.4 on Ubuntu 18.04 LTS (Bionic Beaver) in six easy steps (updated 26-11-2018).

Install Ubuntu 18.04 LTS (Bionic Beaver) 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: DATABASE_NAME_HERE => To exit type:- \q To add PostGIS-2.4 support to the database 5. sudo apt-get install -y postgis postgresql-10-postgis-2.4 sudo -u postgres psql -c "CREATE EXTENS