Changes between Version 3 and Version 4 of UsersWikiPostGIS20Debian60src
- Timestamp:
- 04/03/12 01:08:10 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS20Debian60src
v3 v4 7 7 Install prerequisite packages using: 8 8 {{{ 9 sudo apt-get install build-essential postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev proj libjson0-dev 9 sudo apt-get install build-essential postgresql-8.4 postgresql-server-dev-8.4 libxml2-dev proj libjson0-dev xsltproc docbook-xsl docbook-mathml 10 10 }}} 11 11 … … 14 14 sudo apt-get install libgdal-dev 15 15 }}} 16 Optional packages for testing PostGIS:17 {{{18 sudo apt-get install libcunit1-dev19 }}}20 Optional packages for building documentation:21 {{{22 sudo apt-get install xsltproc docbook-xsl docbook-mathml imagemagick23 }}}24 (for building PDF documentation, add `dblatex`, but expect a large download)25 16 26 27 === Build GEOS 3.3.2 === 17 === Build GEOS 3.3.x === 28 18 PostGIS 2.0 requires GEOS >= 3.3.2 for topology support. 29 19 30 20 There are multiple ways to build GEOS, but this is the simplest: 31 21 {{{ 32 wget http://download.osgeo.org/geos/geos-3.3. 2.tar.bz233 tar xvfj geos-3.3. 2.tar.bz234 cd geos-3.3. 222 wget http://download.osgeo.org/geos/geos-3.3.3.tar.bz2 23 tar xvfj geos-3.3.3.tar.bz2 24 cd geos-3.3.3 35 25 ./configure 36 26 make … … 41 31 == Build PostGIS == 42 32 {{{ 43 wget http://postgis.refractions.net/download/postgis-2.0.0 beta4.tar.gz44 tar xfvz postgis-2.0.0 beta4.tar.gz45 cd postgis-2.0.0 beta433 wget http://postgis.refractions.net/download/postgis-2.0.0rc2.tar.gz 34 tar xfvz postgis-2.0.0rc2.tar.gz 35 cd postgis-2.0.0rc2 46 36 }}} 47 37 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: … … 61 51 }}} 62 52 63 == Template == 64 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 == 65 54 66 Log-in as `postgres` from `root` using "`su - postgres`", and use the following commands: 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 Log-in as `postgres` from `root` using "`su - postgres`", and use the following commands. Install PostGIS: 67 60 {{{ 68 61 createdb template_postgis … … 73 66 }}} 74 67 75 === Enable raster extension === 76 Adding on to `template_postgis`: 68 with raster support: 77 69 {{{ 78 70 psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-2.0/rtpostgis.sql … … 80 72 }}} 81 73 82 === Enable topology extension === 83 Adding on to `template_postgis`: 74 with topology support: 84 75 {{{ 85 76 psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-2.0/topology.sql