Changes between Version 1 and Version 2 of UsersWikiPostGIS24UbuntuPGSQL10Apt
- Timestamp:
- 05/20/18 20:18:23 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UsersWikiPostGIS24UbuntuPGSQL10Apt
v1 v2 1 1 The [http://wiki.postgresql.org/wiki/Apt PostgreSQL Apt Repository] now hosts installs of PostGIS, pgRouting, in addition to Postgresql and PGAdmin. 2 2 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.3 The 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. 4 4 5 5 Run these in terminal: … … 17 17 Helper on [http://www.postgresql.org/download/linux/ubuntu/] 18 18 19 For xenial (16.04. 2LTS)19 For xenial (16.04.4 LTS) 20 20 21 21 {{{ … … 30 30 31 31 {{{ 32 sudo apt -getupdate32 sudo apt update 33 33 }}} 34 34 35 35 == 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 36 The following will install postgresql 9.6, PostGIS 2.3, PGAdmin4, pgRouting 2.3 and additional supplied modules including the '''adminpack''' extension: 37 38 39 {{{ 40 sudo apt install postgresql-10 41 sudo apt install postgresql-10-postgis-2.4 42 sudo apt postgresql-10-postgis-scripts 42 43 43 44 #to get the commandline tools shp2pgsql, raster2pgsql you need to do this 44 sudo apt -getinstall postgis45 sudo apt install postgis 45 46 }}} 46 47 47 48 == To get pgRouting == 48 49 {{{ 49 # Install pgRouting package 50 sudo apt-get install postgresql-10-pgrouting 51 52 }}} 50 # Install pgRouting 2.6 package 51 sudo apt install postgresql-10-pgrouting 52 53 }}} 54 == Enable Adminpack == 55 56 While in terminal, log in to the psql console as postgres user: 57 58 {{{ 59 sudo -u postgres psql 60 }}} 61 62 63 64 {{{ 65 CREATE EXTENSION adminpack; 66 }}} 67 68 53 69 54 70 Never install PostGIS in the postgres database, create a user database … … 78 94 ------------------------------------------------------------------------------------------------------------------------------------------------------ 79 95 ----------------------------------------------------- 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= 81 97 "2.9.3" LIBJSON="0.11.99" LIBPROTOBUF="1.2.1" RASTER 82 (1 row)83 98 }}} 84 99 85 100 Installing postgis_sfcgal, if you need advanced 3D support 86 #note this was not available for me 101 87 102 88 103 {{{ … … 95 110 96 111 {{{ 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 101 118 }}} 102 119 … … 115 132 116 133 {{{ 117 version | tag | hash | branch| boost118 ---------+--------+--------- --+--------+--------119 2. 5.2 | v2.5.2 | 60585f1f7 | master| 1.58.0134 version | tag | hash | branch | boost 135 ---------+--------+---------+-------------+-------- 136 2.6.0 | v2.6.0 | a6226c4 | release/2.6 | 1.58.0 120 137 (1 row) 121 138 }}} … … 181 198 182 199 {{{ 183 184 200 name | setting 185 201 -------------------+----------------------------------------- … … 190 206 ident_file | /etc/postgresql/10/main/pg_ident.conf 191 207 (5 rows) 208 192 209 }}} 193 210 … … 243 260 cd sources 244 261 sudo apt-get install git 245 sudo apt-get install postgresql-server-dev- 10262 sudo apt-get install postgresql-server-dev-9.6 246 263 sudo apt-get install make 247 264 sudo apt-get install gcc 248 sudo apt-get install libgdal -dev265 sudo apt-get install libgdal1-dev 249 266 250 267 sudo git clone -b master https://github.com/pramsey/pgsql-ogr-fdw.git pgsql_ogr_fdw 251 268 cd pgsql_ogr_fdw 252 export PATH=/usr/lib/postgresql/ 10/bin:$PATH269 export PATH=/usr/lib/postgresql/9.6/bin:$PATH 253 270 make && make install 254 271 }}}