PostGIS Installation

From edegan.com
Jump to navigation Jump to search


Installation Commands

Going off of http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS23UbuntuPGSQL96Apt

$ lsb_release --codename
Codename:       trusty
$ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-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
$ psql -V
psql (PostgreSQL) 9.5.4
$ sudo apt install postgresql-9.5-postgis-2.3
$ sudo apt-get install --no-install-recommends postgis

Enabling Commands

Need to enable for each database you want to use it in before you can use it.

Going off of right column of http://postgis.net/install/

$ psql -U postgres
> create extension postgis;
> create extension fuzzystrmatch;
> create excention postgis_tiger_geocoder;