sudo apt-get update
Install Java 8 from OpenJDK (even though Oracle is recommended, also Java 9 is not supported for Geoserver 2.12)
https://medium.com/coderscorner/installing-oracle-java-8-in-ubuntu-16-10-845507b13343
sudo apt-get install openjdk-8-jdk
sudo apt-get install libgdal-dev libgeos-dev libpq-dev gdal-bin
sudo apt-get install tomcat8
This creates the tomcat8 user
sudo service tomcat8 start
go to the ip address and the 8080 port (ex: http://34.229.242.250:8080/) and you should see that it works!
Here is where your webapp should be: /var/lib/tomcat8/webapps/
In the home dir of the server wget the WAR (web archive from the Geoserver version you want, ex from this page: http://geoserver.org/release/stable/)
wget http://sourceforge.net/projects/geoserver/files/GeoServer/2.12.1/geoserver-2.12.1-war.zip
sudo apt-get install unzip
unzip geoserver-2.12.1-war.zip
now you need to copy the geoserver.war file to the Tomcat8 webapps dir (/var/lib/tomcat8/webapps/).
sudo cp geoserver.war /var/lib/tomcat8/webapps/
My understanding is that Geoserver still relies on GDAL version 1. The sudo apt-get install libgdal-dev and gdal-bin commands should have install version 1.11.3
The ImageIO-Ext is an Open Source project that provides extensions, fixes and improvements for the standard Oracle Java Image I/O project such as support for the GDAL I/O library
The core module of the project is the gdalframework module which provide a bridge between the Java Image I/O framework and the Geospatial Data Abstraction Library via SWIG's generated Java bindings to provide support for a reach set of data formats.
From GeoServer version 2.2.x, the GDAL extension must be installed. To install it:
-
Navigate to the GeoServer download page.
-
Find the page that matches the version of the running GeoServer (http://geoserver.org/release/stable/).
Warning Be sure to match the version of the extension with that of GeoServer, otherwise errors will occur. Download the GDAL extension. The download link for GDAL will be in the Extensions section under Coverage Format.
- Extract the files in this archive to the WEB-INF/lib directory of your GeoServer installation.
The ImageIO-Ext GDAL plugin for geoserver master uses ImageIO-Ext 1.1.16 whose artifacts can be downloaded. From the Image IO-Ext gdal artifact download link we need to download two things:
- The CRS definitions (this means the gdal-data.zip file)
- download the CRS definitions archive named “gdal_data.zip”
- Extract this archive on disk and place it in a proper directory on your system. (like in the /opt dir for instance)
/home/ubuntu$ http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.16/native/gdal/gdal-data.zip
GDAL_DATA is an environment variable used to specify location of supporting files used by GDAL library as well as GDAL and OGR utilities. For instance, in order for OGR and GDAL to properly evaluate EPSG codes you need to have the EPSG support files (so called dictionaries, mostly in CSV format), like gcs.csv and pcs.csv, found in the directory pointed by GDAL_DATA variable.
- Add the GDAL_DATA environment variable to the tomcat config file (/etc/default/tomcat8). Make also sure that this directory is reachable and readable by the application server process’s user. Ex:
add this line to /etc/default/tomcat8
GDAL_DATA=/opt/gdal-data
- The native libraries matching the target operating system (use gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz)
$ wget http://demo.geo-solutions.it/share/github/imageio-ext/releases/1.1.X/1.1.16/native/gdal/linux/gdal192-Ubuntu12-gcc4.6.3-x86_64.tar.gz
$ tar xzvf gdal-1.9.2.tar.gz
- Add the LD_LIBRARY_PATH environment variable to the tomcat config file (/etc/default/tomcat8). Make also sure that this directory is reachable and readable by the application server process’s user. Ex:
add this line to /etc/default/tomcat8
LD_LIBRARY_PATH=/opt/gdal192
sudo service tomcat8 restart
Now check your geoserver and see if the additional GDAL extensions appear when you create a new store
- more memory: edit /etc/defualt/tomcat file and increase Xmx parameter
- more swap space: follow these directions: https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04