Changes between Version 1 and Version 2 of UsersWikiPostGIS24Debian9src


Ignore:
Timestamp:
Aug 19, 2017, 8:56:15 AM (7 years ago)
Author:
chrismarx
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS24Debian9src

    v1 v2  
    44
    55== Prerequisites ==
    6 Several components are needed, which can either be built from source or installed from pre-built packages, as shown below.
     6Several 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/]
    77
    8 Install prerequisite packages using:
     8Without the Docker image, start by first installing the Postgres package:
    99{{{
    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
     10sudo apt-get install postgresql-9.1 postgresql-server-dev-9.1
     11}}}
     12
     13Then for either approach, install the prerequisite packages using:
     14{{{
     15sudo apt-get install build-essential libxml2-dev libgdal-dev libproj-dev libjson0-dev xsltproc docbook-xsl docbook-mathml
    1116}}}
    1217
    1318=== 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.
     19PostGIS 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}}}.
    1520
    16 There are multiple ways to build GEOS, but this is the simplest:
     21There 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):
    1722{{{
    18 wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2
     23wget http://geos.osgeo.org/snapshots/geos-20170817.tar.bz2
    1924tar xfj geos-3.4.2.tar.bz2
    2025cd geos-3.4.2
     
    2732== Build PostGIS ==
    2833{{{
    29 wget http://download.osgeo.org/postgis/source/postgis-2.1.8.tar.gz
    30 tar xfz postgis-2.1.8.tar.gz
    31 cd postgis-2.1.8
     34wget http://postgis.net/stuff/postgis-2.4.0dev.tar.gz
     35tar xfz postgis-2.4.0dev.tar.gz
     36cd postgis-2.4.0dev
    3237}}}
    3338
    34 A basic configuration for PostGIS 2.1, with raster and topology support:
     39A basic configuration for PostGIS 2.4, with raster and topology support:
    3540{{{
    3641./configure
     
    4146}}}
    4247
    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/shp2pgsql
    46 sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/pgsql2shp
    47 sudo ln -sf /usr/share/postgresql-common/pg_wrapper /usr/local/bin/raster2pgsql
    48 }}}
    4948
    5049== Spatially enabling a database ==