Installation on Windows

To install GeoServer Enterprise in MS Windows, follow these steps.

Java Runtime Environment

GeoServer Enterprise requires a Java 8 runtime Environment.

OpenJDK is now the lead project for the Java ecosystem. As an open-source company GeoCat is pleased to see OpenJDK supported by a number of different distributions.

Recommended: To install the OpenJDK JRE using the AdoptOpenJDK MSI installer:

  1. Navigate to the AdoptOpenJDK download page

  2. Select OpenJDK 8 (LTS) as the version to download.

    ../../_images/openjdk81.png
  3. Select Windows as your Operating System.

    ../../_images/openjdk.png
  4. Select the corresponding architecture for your system in the Architecture field.

    ../../_images/openjdkarchitecture.png
  5. Recommended: Click the JRE msi download for the OpenJDK MSI Installer.

    ../../_images/jre_download.png
  6. During installation Custom Setup page select the options:

    • Add to PATH

    • Set JAVA_HOME variable

    These settings take care of updating the system variables.

    ../../_images/msi-install-java-home.png
  7. To ensure that Java is now correctly installed, open a console and type java -version. The output should look something like this:

    > java -version
    
    openjdk version "1.8.0_275"
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)
    

Alternative: To install the OpenJDK JRE using the AdoptOpenJDK binary distribution:

  1. Click JRE zip download for the OpenJDK binary distribution.

    ../../_images/jre_download.png
  2. In your system, create a folder called java under your Program files folder.

  3. Extract the content of the downloaded zip file into that folder. Your folder structure under the Program Files folder should now look like this:

    ../../_images/jdkfilestructure.png
  4. Open the Windows System configuration by going to Start Menu ‣ Control Panel ‣ System and then click on the Advanced system settings link. Move to the Advanced tab.

    ../../_images/winsystemsettings.png
  5. Click on the Environment variables button.

    ../../_images/winenvvariables.png
  6. In the System variables section, click on New to create a new variable. Enter the following values to configure the new variable:

    ../../_images/winjavahome.png
  7. Edit the Path variable by selecting it and clicking on Edit.

    ../../_images/winpathvariable.png
  8. Click on New to add a new line to the variable and enter %JAVA_HOME%bin to add the Java JRE folder to your system PATH.

    ../../_images/winpathvariable2.png
  9. Close the Environment variables and Windows System configuration dialog.

  10. To ensure that Java is now correctly installed, open a console and type java -version. The output should look something like this:

    > java -version
    
    openjdk version "1.8.0_275"
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.275-b01, mixed mode)
    

Apache Tomcat

Apache Tomcat is the leading open source application server.

GeoServer Enterprise supports Apache Tomcat 8.5.x or 9.0.x.

To install Tomcat, follow these steps:

  1. Visit the Apache Tomcat Download page.

  2. Under Binary Distirbutions download 32-bit/64-bit Windows Service Installer (pgp, sha512).

    ../../_images/tomcat_download.png
  3. Run the installer installer, this will setup:

    • Apache Tomcat

    • Tomcat Properties user interface to control configuration and settings

  4. Choose Components page: select the Native and Service Startup, and Manager options.

    ../../_images/tomcatinstalloptions.png
  5. Configuration page: provide Tomcat Administrator Login credentials:

    User Name

    admin

    Password:

    tomcat (example)

    Roles

    manager-gui

    ../../_images/wintomcatconfiguration.png
  6. Use browser to confirm server is running:

    ../../_images/apache-tomcat-localhost.png
  7. Once installed, Tomcat has to be correctly configured to provide a better performance when running GeoServer Enterprise. The first thing to configure are its Java Virtual Machine runtime parameters.

  8. From the Windows Start menu select Apache Tomcat ‣ Configure Tomcat to open Tomcat Properties.

    ../../_images/tomcat-properties.png

    Note

    On a fresh install the short cut above may be unable to start a permissions issue:

    ../../_images/tomcat-properties-permissions.png

    To resolve navigate to the C:\Program Files\Apache Software Foundation\Tomcat 9.0 which will prompt to grant access to this directory.

  9. Change to Logon tab, select:

    Local System account:

    selected

    Allow service to interact with desktop

    checked

    ../../_images/tomcat-properties-logon.png
  10. Change to the Java tab, add the highlighted lines below to Java Options:

    -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
    -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
    -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties
    -XX:SoftRefLRUPolicyMSPerMB=36000
    -XX:-UsePerfData
    -Dorg.geotools.referencing.forceXY=true
    

    Update the memory options to:

    Initial memory pool:

    512 MB

    Maximum memory pool:

    1536 MB

    ../../_images/tomcat-properties-java.png
  11. Return to General tab:

    • Use the Apply button to update the service with these settings.

    • Use the Stop and Start buttons to restart the service

    ../../_images/tomcat-properties.png
  12. From http://localhost:8080/ click Server Status to confirm available memory, under the JVM heading.

    ../../_images/tomcat-server-status.png

    Note

    The tomcat manager requires the Tomcat Administrator Login credentials used during installation.

Note

Optional

Environment variables can be managed using the optional bin/setup.bat file:

  • JAVA_HOME

  • CATALINA_OPTS: additional Java startup options used when launching Tomcat

Rem Prepend JVM Options
SET CATALINA_OPTS=-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UsePerfData %CATALINA_OPTS%

Rem Append system property values
SET CATALINA_OPTS=%CATALINA_OPTS% -Dorg.geotools.referencing.forceXY=true

Data Directory

GeoServer places all its required configuration files in a data directory.

We recommend starting with a ready-to-use data directory stored in C:\ProgramData\GeoServer:

  1. Create a folder to hold your GeoServer Enterprise configuration:

    • C:\ProgramData\GeoServer\

  2. GeoCat provides a choice of two ready to use data directories:

    • geoserver-data-standard.zip - services setup, includes sample layers.

    • geoserver-data-default.zip - services setup only.

  3. To download:

    • GeoCat Enterprise customers login to nexus.geocat.net and browse to the enterprise folder:

      https://nexus.geocat.net/#browse/browse:enterprise

      Navigate to the latest geoserver release, and download geoserver-data-default.zip or geoserver-data-standard.zip.

      ../../_images/nexus-download.png

      GeoServer Enterprise downloads geoserver data zip archives

    • GeoCat Training customers are provided with geoserver-data-standard.zip data directory as part of course materials.

  4. Unzip, and copy the data folder.

    • C:\ProgramData\GeoServer\data.

  5. Create the tilecache folder.

    • C:\ProgramData\GeoServer\tilecache

    ../../_images/geowebcache_cache_dir.png

    GEOWEBCACHE_CACHE_DIR

  6. Update the Tomcat configuration with these directory locations.

    • Open the Tomcat folder, by selecting the Apache Tomcat ‣ Tomcat Program Directory menu entry in the Windows Start menu.

    • Navigate to the conf\catalina\localhost subfolder.

    • In the localhost folder, create a geoserver.xml file, with the following content:

      <Context docBase="geoserver.war">
        <Parameter name="GEOSERVER_DATA_DIR"
                   value="C:\ProgramData\GeoServer\data" override="false"/>
        <Parameter name="GEOSERVER_REQUIRE_FILE"
                   value="C:\ProgramData\GeoServer\data\global.xml" override="false"/>
        <Parameter name="GEOWEBCACHE_CACHE_DIR"
                   value="C:\ProgramData\GeoServer\tilecache" override="false"/>
      </Context>
      

Note

Starting with an empty data directory

GeoServer can also be configured to start with an empty folder, GeoServer will generate configuration files to this folder the first time it runs:

  • Create an empty folder C:\ProgramData\GeoServer\data

  • Remove the GEOSERVER_REQUIRE_FILE startup check for global.xml:

    <Context docBase="geoserver.war">
      <Parameter name="GEOSERVER_DATA_DIR"
                 value="C:\ProgramData\GeoServer\data" override="false"/>
      <Parameter name="GEOWEBCACHE_CACHE_DIR"
                 value="C:\ProgramData\GeoServer\tilecache" override="false"/>
    </Context>
    

This approach is often used in automated workflow where GeoServer is configured via REST API scripts.

GeoServer Enterprise

To install GeoServer on your existing Tomcat instance, follow these steps:

  1. Login to nexus.geocat.net and browse to the enterprise folder:

    Navigate to the latest geoserver release and select the geoserver-standard zip archive.

    ../../_images/nexus-download.png
  2. Unzip this file containing:

    • windows - sample configuration files

    • geoserver.war - geoserver enterprise web application

    • GPL and LICENSE.txt open source license information

  3. Open the Tomcat Program folder by using the Start menu to select Apache Tomcat ‣ Tomcat Program Directory.

    ../../_images/tomcatprogramfolder.png
  4. Open the webapps folder.

  5. Copy the geoserver.war file to the to tomcat webapps folder.

    Tomcat will deploy geosever.war web application, creating geoserver folder for the running application.

  6. In your web browser, navigate to localhost:8080/geoserver to verify that GeoServer Enterprise is correctly working.

    ../../_images/gserunning.png