Changes between Initial Version and Version 1 of UsersWikiPostGIS21Ubuntu1404src


Ignore:
Timestamp:
Jul 28, 2014, 4:01:42 AM (10 years ago)
Author:
Mike Taves
Comment:

create instructions for PostGIS 2.1 on Ubuntu 14.04 LTS (trusty)

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS21Ubuntu1404src

    v1 v1  
     1= How to install PostGIS 2.1 on Ubuntu 14.04 LTS (''trusty'') from source =
     2
     3== Prerequisites ==
     4Several components are needed, which can either be built from source or installed from pre-built packages, as shown below.
     5
     6Install prerequisite packages using:
     7{{{
     8sudo apt-get install build-essential postgresql-9.3 postgresql-server-dev-9.3 libgeos-c1 libgdal-dev libproj-dev libjson-c-dev libxml2-dev libxml2-utils xsltproc docbook-xsl docbook-mathml
     9}}}
     10
     11== Build PostGIS ==
     12{{{
     13wget http://download.osgeo.org/postgis/source/postgis-2.1.3.tar.gz
     14tar xfz postgis-2.1.3.tar.gz
     15cd postgis-2.1.3
     16}}}
     17
     18A basic configuration for PostGIS 2.1, with raster and topology support:
     19{{{
     20./configure
     21make
     22sudo make install
     23sudo ldconfig
     24sudo make comments-install
     25}}}
     26
     27Lastly, enable the command-line tools to work from your shell:
     28{{{
     29sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql
     30sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
     31sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql
     32}}}
     33
     34== Spatially enabling a database ==
     35
     36Connect to your database using pgAdminIII or psql, and use the commands to add the PostgreSQL extensions. To add PostGIS with raster support:
     37{{{
     38CREATE EXTENSION postgis;
     39}}}
     40
     41To add topology support, a second extension can be created on the database:
     42{{{
     43CREATE EXTENSION postgis_topology;
     44}}}
     45
     46== See also ==
     47 * https://help.ubuntu.com/community/PostgreSQL