Changes between Version 5 and Version 6 of UsersWikiPostGIS20Ubuntu1004src
- Timestamp:
- 04/03/12 01:01:14 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified UsersWikiPostGIS20Ubuntu1004src
v5 v6 6 6 Install prerequisite packages using: 7 7 {{{ 8 sudo apt-get install build-essential postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev proj libjson0-dev 8 sudo apt-get install build-essential postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml 9 9 }}} 10 10 … … 14 14 }}} 15 15 16 Optional packages for testing PostGIS: 17 {{{ 18 sudo apt-get install libcunit1-dev 19 }}} 20 Optional packages for building documentation: 21 {{{ 22 sudo apt-get install xsltproc docbook-xsl docbook-mathml imagemagick 23 }}} 24 (for building PDF documentation, add `dblatex`, but expect a large download) 25 26 === Build GEOS 3.3.2 === 16 === Build GEOS 3.3.x === 27 17 PostGIS 2.0 requires GEOS >= 3.3.2 for topology support. 28 18 29 19 There are multiple ways to build GEOS, but this is the simplest: 30 20 {{{ 31 wget http://download.osgeo.org/geos/geos-3.3. 2.tar.bz232 tar xvfj geos-3.3. 2.tar.bz233 cd geos-3.3. 221 wget http://download.osgeo.org/geos/geos-3.3.3.tar.bz2 22 tar xvfj geos-3.3.3.tar.bz2 23 cd geos-3.3.3 34 24 ./configure 35 25 make … … 40 30 == Build PostGIS == 41 31 {{{ 42 wget http://postgis.refractions.net/download/postgis-2.0.0 beta4.tar.gz43 tar xfvz postgis-2.0.0 beta4.tar.gz44 cd postgis-2.0.0 beta432 wget http://postgis.refractions.net/download/postgis-2.0.0rc2.tar.gz 33 tar xfvz postgis-2.0.0rc2.tar.gz 34 cd postgis-2.0.0rc2 45 35 }}} 46 PostGIS 2.0 can be configured to disable topology or raster extensions, using the configure flags `--without-raster` and `--without-topology`. The default is to build both extensions: 36 37 PostGIS 2.0 can be configured to disable topology or raster support, using the configure flags `--without-raster` and `--without-topology`. The default is to build both: 47 38 {{{ 48 39 ./configure … … 60 51 }}} 61 52 62 == Template == 63 Complete 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. 53 == Using enabler scripts == 54 55 Enabler scripts can be used to either build a template, or directly spatially enable a database. 56 57 The following example creates 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. 58 59 PostGIS: 64 60 {{{ 65 61 sudo -u postgres createdb template_postgis … … 70 66 }}} 71 67 72 === Enable raster extension === 73 Adding on to `template_postgis`: 68 with raster support: 74 69 {{{ 75 70 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-2.0/rtpostgis.sql … … 77 72 }}} 78 73 79 === Enable topology extension === 80 Adding on to `template_postgis`: 74 with topology support: 81 75 {{{ 82 76 sudo -u postgres psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-2.0/topology.sql