Skip to content

Instantly share code, notes, and snippets.

@slaveofcode
Created April 18, 2018 07:50
Show Gist options
  • Save slaveofcode/82077c410f0666d263fdcbad8777be83 to your computer and use it in GitHub Desktop.
Save slaveofcode/82077c410f0666d263fdcbad8777be83 to your computer and use it in GitHub Desktop.
Installing Postgis
# Get ubuntu version
>> sudo lsb_release -a
# For xenial (16.04.2 LTS)
>> sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main" >> /etc/apt/sources.list'
>> wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
>> sudo apt-get update
>> sudo apt-get install postgresql-9.6
>> sudo apt-get install postgresql-9.6-postgis-2.3 postgresql-contrib-9.6 postgresql-9.6-postgis-scripts
# To get the commandline tools shp2pgsql, raster2pgsql you need to do this
>> sudo apt-get install postgis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment