Changes between Version 14 and Version 15 of UsersWikiPostGIS20Ubuntu1204src


Ignore:
Timestamp:
Nov 8, 2013, 9:33:15 PM (11 years ago)
Author:
Mike Taves
Comment:

rollback to v11; as the title suggests, this is only for PostGIS 2.0; for version 2.1 there is a different article

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS20Ubuntu1204src

    v14 v15  
    1 = How to install PostGIS 2.1 on Ubuntu 12.04 LTS (''precise'') from source =
     1= How to install PostGIS 2.0 on Ubuntu 12.04 LTS (''precise'') from source =
    22
    33== Prerequisites ==
     
    1414}}}
    1515
    16 === Build GEOS 3.4.x ===
    17 PostGIS 2.1 requires GEOS >= 3.3.2 for topology support, however Ubuntu 12.04 only has GEOS 3.2.2 available in packages, so it needs to be built from source. If you don't need topology, you don't ''need'' to build this component, but it is highly recommended.
     16=== Build GEOS 3.3.x ===
     17PostGIS 2.0 requires GEOS >= 3.3.2 for topology support, however Ubuntu 12.04 only has GEOS 3.2.2 available in packages, so it needs to be built from source. If you don't need topology, you don't ''need'' to build this component, but it is highly recommended.
    1818
    1919There are multiple ways to build GEOS, but this is the simplest:
    2020{{{
    21 wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
    22 tar xfj geos-3.4.2.tar.bz2
    23 cd geos-3.4.2
     21wget http://download.osgeo.org/geos/geos-3.3.9.tar.bz2
     22tar xfj geos-3.3.9.tar.bz2
     23cd geos-3.3.9
    2424./configure
    2525make
     
    3030== Build PostGIS ==
    3131{{{
    32 wget http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz
    33 tar xfz postgis-2.1.1.tar.gz
    34 cd postgis-2.1.1
     32wget http://download.osgeo.org/postgis/source/postgis-2.0.4.tar.gz
     33tar xfz postgis-2.0.4.tar.gz
     34cd postgis-2.0.4
    3535}}}
    3636
    37 PostGIS 2.1 can be configured to disable topology or raster components, using the configure flags `--without-raster` and/or `--without-topology`. The default is to build both. Note that raster is required for the extension installation method for PostgreSQL.
     37PostGIS 2.0 can be configured to disable topology or raster components, using the configure flags `--without-raster` and/or `--without-topology`. The default is to build both. Note that raster is required for the extension installation method for PostgreSQL.
    3838{{{
    3939./configure
     
    7777sudo -u postgres createdb template_postgis
    7878sudo -u postgres psql -d template_postgis -c "UPDATE pg_database SET datistemplate=true WHERE datname='template_postgis'"
    79 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/postgis.sql
    80 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/spatial_ref_sys.sql
    81 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/postgis_comments.sql
     79sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql
     80sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql
     81sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis_comments.sql
    8282}}}
    8383
    8484with raster support:
    8585{{{
    86 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/rtpostgis.sql
    87 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/raster_comments.sql
     86sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/rtpostgis.sql
     87sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/raster_comments.sql
    8888}}}
    8989
    9090with topology support:
    9191{{{
    92 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/topology.sql
    93 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/topology_comments.sql
     92sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/topology.sql
     93sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/topology_comments.sql
    9494}}}
    9595