Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Ubuntu 16.04 - Install PostGIS

sudo apt-get install postgis

Setting Up Database For PostGIS

sudo -u postgres psql

Connect to the relevant database

\connect my_gis_database

Create the extension

CREATE EXTENSION postgis;

Check version:

SELECT PostGIS_version();
            postgis_version            
---------------------------------------
 2.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1
(1 row)

References