Changes between Version 1 and Version 2 of UsersWikiPostGIS24Debian9src
- Timestamp:
- 08/19/17 08:56:15 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified UsersWikiPostGIS24Debian9src
v1 v2 4 4 5 5 == Prerequisites == 6 Several components are needed, which can either be built from source or installed from pre-built packages, as shown below. 6 Several components are needed, which can either be built from source or installed from pre-built packages, as shown below. For a quick start, there are official Docker images for Postgres here [https://hub.docker.com/_/postgres/] 7 7 8 Install prerequisite packages using:8 Without the Docker image, start by first installing the Postgres package: 9 9 {{{ 10 sudo apt-get install build-essential postgresql-9.1 postgresql-server-dev-9.1 libxml2-dev libgdal-dev libproj-dev libjson0-dev xsltproc docbook-xsl docbook-mathml 10 sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1 11 }}} 12 13 Then for either approach, install the prerequisite packages using: 14 {{{ 15 sudo apt-get install build-essential libxml2-dev libgdal-dev libproj-dev libjson0-dev xsltproc docbook-xsl docbook-mathml 11 16 }}} 12 17 13 18 === Build GEOS 3.4.x === 14 PostGIS 2. 1 is best used with GEOS >= 3.4 for several new features, however Debian wheezy only has GEOS 3.3.3 available in packages, so it needs to be built from source. If you don't need the new features, instead install the {{{libgeos-dev}}} package.19 PostGIS 2.4 is best used with GEOS >= 3.7 for several new features, however Debian wheezy only has GEOS 3.5.1 available in packages, so if you want the version that enables all features, GEOS needs to be built from source. If you don't need the new features(e.g ST_FrechetDistance), you can instead install the available version of GEOS {{{sudo apt-get libgeos-dev}}}. 15 20 16 There are multiple ways to build GEOS , but this is the simplest:21 There are multiple ways to build GEOS from source, but this is the simplest (Note: currently version 3.7 is only available in the nightly build. When 3.7 is released, switch to that): 17 22 {{{ 18 wget http:// download.osgeo.org/geos/geos-3.4.2.tar.bz223 wget http://geos.osgeo.org/snapshots/geos-20170817.tar.bz2 19 24 tar xfj geos-3.4.2.tar.bz2 20 25 cd geos-3.4.2 … … 27 32 == Build PostGIS == 28 33 {{{ 29 wget http:// download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz30 tar xfz postgis-2. 1.8.tar.gz31 cd postgis-2. 1.834 wget http://postgis.net/stuff/postgis-2.4.0dev.tar.gz 35 tar xfz postgis-2.4.0dev.tar.gz 36 cd postgis-2.4.0dev 32 37 }}} 33 38 34 A basic configuration for PostGIS 2. 1, with raster and topology support:39 A basic configuration for PostGIS 2.4, with raster and topology support: 35 40 {{{ 36 41 ./configure … … 41 46 }}} 42 47 43 Lastly, enable the command-line tools to work from your shell:44 {{{45 sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/shp2pgsql46 sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp47 sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql48 }}}49 48 50 49 == Spatially enabling a database ==