Changes between Initial Version and Version 1 of UsersWikiPostGIS15Ubuntu1004src


Ignore:
Timestamp:
Mar 5, 2012, 4:29:03 AM (12 years ago)
Author:
Mike Taves
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS15Ubuntu1004src

    v1 v1  
     1= How to install PostGIS 1.5 on Ubuntu 10.10 LTS (''lucid'') 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 proj postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev
     9}}}
     10
     11Optional packages for testing PostGIS:
     12{{{
     13sudo apt-get install libcunit1-dev
     14}}}
     15Optional packages for building documentation:
     16{{{
     17sudo apt-get install xsltproc docbook-xsl imagemagick
     18}}}
     19(for building PDF documentation, add `dblatex`, but expect a large download)
     20
     21=== Build GEOS 3.3.x ===
     22PostGIS 1.5 requires GEOS >= 3.1.1, however Ubuntu 10.10 only has GEOS 3.1 available in packages, so it needs to be built from source.
     23
     24There are multiple ways to build GEOS, but this is the simplest:
     25{{{
     26wget http://download.osgeo.org/geos/geos-3.3.2.tar.bz2
     27tar xvfj geos-3.3.2.tar.bz2
     28cd geos-3.3.2
     29./configure
     30make
     31sudo make install
     32}}}
     33
     34== Build PostGIS ==
     35Download, configure, build and install:
     36{{{
     37wget http://postgis.refractions.net/download/postgis-1.5.3.tar.gz
     38tar xfvz postgis-1.5.3.tar.gz
     39cd postgis-1.5.3
     40./configure
     41make
     42sudo make install
     43sudo ldconfig
     44}}}
     45
     46=== Documentation/comments ===
     47From the `postgis-1.5.3` directory:
     48{{{
     49cd doc
     50make
     51sudo make install
     52sudo make comments-install
     53}}}
     54
     55== Template ==
     56Complete a post-install by creating a template, which can be re-used for creating multiple spatially-enabled databases. Or if you just want to make one spatially enabled database, you can modify the commands for your needs.
     57
     58Log-in as `postgres` from `root` using "`su - postgres`", and use the following commands:
     59{{{
     60sudo -u postgres createdb template_postgis
     61sudo -u postgres createlang plpgsql template_postgis
     62sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
     63sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
     64sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis_comments.sql
     65}}}