meta data for this page

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
software:postgresql:pgsql-u7 [2021/07/25 14:36] – created christiansoftware:postgresql:pgsql-u7 [2021/07/25 21:28] (current) christian
Line 3: Line 3:
 This is a short description to get PostgreSQL v12 spatially enabled on [https://uberspace.de|Uberspace's]] U7. This is partly based on the guide [[https://www.alexbilz.com/post/2020-08-18-install-postgis-on-uberspace/|Alexander Bilz]] has on his website but with some tweaks. This is a short description to get PostgreSQL v12 spatially enabled on [https://uberspace.de|Uberspace's]] U7. This is partly based on the guide [[https://www.alexbilz.com/post/2020-08-18-install-postgis-on-uberspace/|Alexander Bilz]] has on his website but with some tweaks.
  
-  - Enable Postgresql version 12 in your U7 - follow the [[https://manual.uberspace.de/database-postgresql/|manual]] and [[https://lab.uberspace.de/guide_postgresql.html| Uber Lab guide]] to get that going. +When following the Uberspace lab/manual for installing PostgreSQL, your installation is going to live in ''$HOME/opt/postgresql'', I will therefore use the ''$HOME/opt'' directory for installing the additional dependencies for PostGIS.
-  - Install a recent version of CMAKE +
-    - ''wget https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-linux-x86_64.sh'' +
-    -  +
-  - Install GEOS +
-    -  +
-  - Install PROJ +
-    - ''wget https://download.osgeo.org/proj/proj-8.1.0.tar.gz'' +
-    -  +
-  - Install GDAL +
-    - ''wget https://github.com/OSGeo/gdal/releases/download/v3.3.1/gdal-3.3.1.tar.gz'' +
-  - Install PostGIS +
-    - ''wget https://download.osgeo.org/postgis/source/postgis-3.1.3.tar.gz'' +
-    - +
  
 +Enable Postgresql version 12 (or others - in this guide I will use PGSQL v12) in your U7 - follow the [[https://manual.uberspace.de/database-postgresql/|manual]] and [[https://lab.uberspace.de/guide_postgresql.html| Uber Lab guide]] to get that going.
 +
 +===== CMAKE =====
 +
 +Some of the dependencies of PostGIS require ''cmake'' such as SFCGAL (as do the [[https://generic-mapping-tools.org|Generic mapping tools]] which will also be used):
 +
 +<code bash>
 +wget https://github.com/Kitware/CMake/releases/download/v3.21.0/cmake-3.21.0-linux-x86_64.sh
 +sh cmake-3.21.0-linux-x86_64.sh && mv cmake-3.21.0-linux-x86_64 ~/bin/cmake
 +
 +</code>
 +
 +===== SFCGAL and dependencies =====
 +
 +SFCGAL has a few dependencies:
 +
 +The [[https://www.mpfr.org/|MPFR library]], [[https://www.mpfr.org/mpfr-current/mpfr.html#Installing-MPFR|install instructions]]
 +<code bash>
 + ./configure --prefix=/home/glorida/opt/mpfr
 +</code>
 +
 +
 +[[https://doc.cgal.org/5.2.3/Manual/installation.html|CGAL installation]]
 +
 +<code bash>
 +mkdir build && cd build
 + ~/bin/cmake-3.21.0-linux-x86_64/bin/cmake -DCMAKE_INSTALL_PREFIX=/home/glorida/opt/CGAL -DMPFR_INCLUDE_DIR=/home/glorida/opt/mpfr/include/  -DMPFR_LIBRARIES=/home/glorida/opt/mpfr/lib/ -DCGAL_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release .. 
 +make
 +make install
 +</code>
 +
 +
 +[[https://gitlab.com/Oslandia/SFCGAL|SFCGAL]]
 +
 +
 +
 +
 +===== GEOS Library =====
 +
 +
 +<code bash>
 +~/bin/cmake-3.21.0-linux-x86_64/bin/cmake -DCMAKE_BUILD_TYPE=Release  --install-prefix=/home/glorida/opt/geos  .. ''
 +make && make install
 +<code>
 +
 +===== PROJ Library =====
 +
 +<code>
 +wget https://download.osgeo.org/proj/proj-8.1.0.tar.gz
 +
 +</code>
 +
 +===== GDAL =====
 +
 +<code>
 +wget https://github.com/OSGeo/gdal/releases/download/v3.3.1/gdal-3.3.1.tar.gz
 +</code>
 +
 +===== PostGIS =====
 +
 +<code bash>
 +wget https://download.osgeo.org/postgis/source/postgis-3.1.3.tar.gz
 +</code>