Changes between Version 14 and Version 15 of UsersWikiPostGIS20Ubuntu1204src
- Timestamp:
- 11/08/13 21:33:15 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS20Ubuntu1204src
v14 v15 1 = How to install PostGIS 2. 1on Ubuntu 12.04 LTS (''precise'') from source =1 = How to install PostGIS 2.0 on Ubuntu 12.04 LTS (''precise'') from source = 2 2 3 3 == Prerequisites == … … 14 14 }}} 15 15 16 === Build GEOS 3. 4.x ===17 PostGIS 2. 1requires 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 === 17 PostGIS 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. 18 18 19 19 There are multiple ways to build GEOS, but this is the simplest: 20 20 {{{ 21 wget http://download.osgeo.org/geos/geos-3. 4.2.tar.bz222 tar xfj geos-3. 4.2.tar.bz223 cd geos-3. 4.221 wget http://download.osgeo.org/geos/geos-3.3.9.tar.bz2 22 tar xfj geos-3.3.9.tar.bz2 23 cd geos-3.3.9 24 24 ./configure 25 25 make … … 30 30 == Build PostGIS == 31 31 {{{ 32 wget http://download.osgeo.org/postgis/source/postgis-2. 1.1.tar.gz33 tar xfz postgis-2. 1.1.tar.gz34 cd postgis-2. 1.132 wget http://download.osgeo.org/postgis/source/postgis-2.0.4.tar.gz 33 tar xfz postgis-2.0.4.tar.gz 34 cd postgis-2.0.4 35 35 }}} 36 36 37 PostGIS 2. 1can 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.37 PostGIS 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. 38 38 {{{ 39 39 ./configure … … 77 77 sudo -u postgres createdb template_postgis 78 78 sudo -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.sql80 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/spatial_ref_sys.sql81 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/postgis_comments.sql79 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis.sql 80 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/spatial_ref_sys.sql 81 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/postgis_comments.sql 82 82 }}} 83 83 84 84 with raster support: 85 85 {{{ 86 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/rtpostgis.sql87 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/raster_comments.sql86 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/rtpostgis.sql 87 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/raster_comments.sql 88 88 }}} 89 89 90 90 with topology support: 91 91 {{{ 92 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/topology.sql93 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2. 1/topology_comments.sql92 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/topology.sql 93 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.0/topology_comments.sql 94 94 }}} 95 95