Changes between Version 1 and Version 2 of UsersWikiPostGIS24UbuntuPGSQL10Apt


Ignore:
Timestamp:
May 20, 2018 8:18:23 PM (5 months ago)
Author:
robe
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UsersWikiPostGIS24UbuntuPGSQL10Apt

    v1 v2  
    11The [http://wiki.postgresql.org/wiki/Apt PostgreSQL Apt Repository]  now hosts installs of PostGIS, pgRouting, in addition to Postgresql and PGAdmin.
    22
    3 The following describes how to install Postgresql 10, PostGIS 2.4, pgRouting 2.5, PGAdmin on Ubuntu version 16.04. It is assumed to also work on Linux Mint, Lubuntu, and Xubuntu.
     3The following describes how to install Postgresql 10, PostGIS 2.4, pgRouting 2.6, PGAdmin on Ubuntu version 16.04. It is assumed to also work on Linux Mint, Lubuntu, and Xubuntu.
    44
    55Run these in terminal:
     
    1717Helper on [http://www.postgresql.org/download/linux/ubuntu/]
    1818
    19 For xenial (16.04.2 LTS)
     19For xenial (16.04.4 LTS)
    2020
    2121{{{
     
    3030
    3131{{{
    32 sudo apt-get update
     32sudo apt update
    3333}}}
    3434
    3535== Install ==
    36 The following will install postgresql 10, PostGIS 2.4, PGAdmin4, pgRouting 2.5 :
    37 
    38 
    39 {{{
    40 sudo apt-get install postgresql-10
    41 sudo apt-get install postgresql-10-postgis-2.4 postgresql-contrib-10 postgresql-10-postgis-scripts
     36The following will install postgresql 9.6, PostGIS 2.3, PGAdmin4, pgRouting 2.3 and additional supplied modules including the '''adminpack''' extension:
     37
     38
     39{{{
     40sudo apt install postgresql-10
     41sudo apt install postgresql-10-postgis-2.4
     42sudo apt postgresql-10-postgis-scripts
    4243
    4344#to get the commandline tools shp2pgsql, raster2pgsql you need to do this
    44 sudo apt-get install postgis
     45sudo apt install postgis
    4546}}}
    4647
    4748== To get pgRouting ==
    4849{{{
    49 # Install pgRouting  package
    50 sudo apt-get install postgresql-10-pgrouting
    51 
    52 }}}
     50# Install pgRouting 2.6 package
     51sudo apt install postgresql-10-pgrouting
     52
     53}}}
     54== Enable Adminpack ==
     55
     56While in terminal, log in to the psql console as postgres user:
     57
     58{{{
     59sudo -u postgres psql
     60}}}
     61
     62
     63
     64{{{
     65CREATE EXTENSION adminpack;
     66}}}
     67
     68
    5369
    5470Never install PostGIS in the postgres database, create a user database
     
    7894------------------------------------------------------------------------------------------------------------------------------------------------------
    7995-----------------------------------------------------
    80  POSTGIS="2.4.3 r16312" PGSQL="100" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML=
     96 POSTGIS="2.4.4 r16526" PGSQL="100" GEOS="3.5.0-CAPI-1.9.0 r4084" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML=
    8197"2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER
    82 (1 row)
    8398}}}
    8499
    85100Installing postgis_sfcgal, if you need advanced 3D support
    86 #note this was not available for me
     101
    87102
    88103{{{
     
    95110
    96111{{{
    97                                                                                    postgis_full_version
    98 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    99  POSTGIS="2.3.2 r15302" GEOS="3.5.0-CAPI-1.9.0 r4084" SFCGAL="1.2.2" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" RASTER
    100 (1 row)
     112                                                                                                   postgis_full_version
     113
     114------------------------------------------------------------------------------------------------------------------------------------------------------
     115--------------------------------------------------------------------
     116 POSTGIS="2.4.4 r16526" PGSQL="100" GEOS="3.5.0-CAPI-1.9.0 r4084" SFCGAL="1.2.2" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 1.11.3, released 2015
     117/09/16" LIBXML="2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER
    101118}}}
    102119
     
    115132
    116133{{{
    117  version |  tag   |   hash    | branch | boost
    118 ---------+--------+-----------+--------+--------
    119  2.5.2   | v2.5.2 | 60585f1f7 | master | 1.58.0
     134 version |  tag   |  hash   |   branch    | boost
     135---------+--------+---------+-------------+--------
     136 2.6.0   | v2.6.0 | a6226c4 | release/2.6 | 1.58.0
    120137(1 row)
    121138}}}
     
    181198
    182199{{{
    183 
    184200       name        |                 setting
    185201-------------------+-----------------------------------------
     
    190206 ident_file        | /etc/postgresql/10/main/pg_ident.conf
    191207(5 rows)
     208
    192209}}}
    193210
     
    243260cd sources
    244261sudo apt-get install git
    245 sudo apt-get install postgresql-server-dev-10
     262sudo apt-get install postgresql-server-dev-9.6
    246263sudo apt-get install make
    247264sudo apt-get install gcc
    248 sudo apt-get install libgdal-dev
     265sudo apt-get install libgdal1-dev
    249266
    250267sudo git clone -b master https://github.com/pramsey/pgsql-ogr-fdw.git pgsql_ogr_fdw
    251268cd pgsql_ogr_fdw
    252 export PATH=/usr/lib/postgresql/10/bin:$PATH
     269export PATH=/usr/lib/postgresql/9.6/bin:$PATH
    253270make && make install
    254271}}}