Difference between revisions of "PostGIS Installation"
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
$ sudo apt install postgresql-9.5-postgis-2.3 | $ sudo apt install postgresql-9.5-postgis-2.3 | ||
$ sudo apt-get install --no-install-recommends postgis</nowiki> | $ sudo apt-get install --no-install-recommends postgis</nowiki> | ||
+ | |||
+ | Note the last line. Without the <code>--no-install-recommends</code> line postgres assumes you're using the default configuration (in this case, postgis for postgresql 9.6). Since we're using a different flavor of postgis, we do not want this. | ||
+ | |||
+ | The <code>postgis</code> apt package is not the extension to postgres. It is a collection of command line utilities for importing and exporting data to a postgis db. | ||
+ | |||
+ | == Creating a Postgis DB == | ||
+ | |||
== Enabling Commands == | == Enabling Commands == |
Revision as of 22:29, 20 September 2017
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
Note the last line. Without the --no-install-recommends
line postgres assumes you're using the default configuration (in this case, postgis for postgresql 9.6). Since we're using a different flavor of postgis, we do not want this.
The postgis
apt package is not the extension to postgres. It is a collection of command line utilities for importing and exporting data to a postgis db.
Creating a Postgis DB
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;