GeoServer

Overview

GeoServer Dedicated Hosting includes the latest, stable version of GeoServer.

The GeoServer page looks as below

../../_images/geos1.png

Location

By default, GeoServer is installed at /home/tomcat/apache-tomcat-<version>/webapps/geoserver

To make upgrading easier, you should always change the GeoServer Data Directory location.

To install GeoServer extensions, see our guide

As we can see above, the creation of our NewReports Directory has been added to the directory structure. This is true for all directories and sub directories added.

Geoserver Extensions

GeoServer Extensions can be installed using the Extension Installer in your control panel.

Click on the Extension Installer icon

../../_images/geos21.png

Select the Extension you wish to install and click Install

../../_images/geos2-a.png

You can also remove Extensions using the Uninstall button as shown below:

../../_images/geos3.png

They can also be installed manually as below:

Below, we are installing the MapFish Print Module via SSH.

  1. Switch to user tomcat

1su - tomcat
  1. Change to the GeoServer /lib directory (adjust for your own file path)

1cd /home/tomcat/apache-tomcat-8.5.15/webapps/geoserver/WEB-INF/lib
  1. Download the desired extension, making sure to match the version to your GeoServer version

1wget http://sourceforge.net/projects/geoserver/files/GeoServer/2.16.2/extensions/geoserver-2.16.2-printing-plugin.zip
  1. Unzip the downloaded file

1unzip -q geoserver-2.16.2-printing-plugin.zip
  1. Remove the zip file

1rm -f geoserver-2.16.2-printing-plugin.zip
  1. Restart Tomcat for the extension to take effect.

Note

Some components, such as GDAL, require additional configuration.

Data Directory

To make GeoServer more portable and easier to upgrade, you should change the GeoServer data directory.

Follow the instructions below, substituting your own paths and file names.

  1. Stop Tomcat

  2. Connect via SSH and move the data directory as below: (Important: the target directory - ‘geo_data’ below - should not exist.)

1mv /home/tomcat/apache-tomcat-8.5.15/webapps/geoserver/data/ /var/lib/geo_data/
  1. Add the following to your GeoServer web.xml file:

1<context-param>
2    <param-name>GEOSERVER_DATA_DIR</param-name>
3    <param-value>/var/lib/geo_data</param-value>
4</context-param>
5
6<context-param>
7   <param-name>GEOSERVER_REQUIRE_FILE</param-name>
8   <param-value>/var/lib/geo_data/global.xml</param-value>
9</context-param>
  1. Start Tomcat

You should log into GeoServer and verify that your workspaces, etc.. are accesible.