Setting up a local environment¶
OGC API modules are still in their infancy and under heavy development. Most of the specs and extensions are still in draft form and their behavior is likely to change in the next months/year. For this reasons this section explains how to set up a local environment using the latest GeoServer build.
From the GeoServer download page click on the development tab and then on the link to the main branch nightly builds.
- Make sure you have a Java Runtime Environment (JRE) installed on your system. GeoServer requires a Java 11 environment (or optionally, a Java 17 one), as provided by the Adoptium open source project.
- Download the geoserver-main-latest-bin.zip. Unzip it in a directory of your choice.
- Download all the necessary geoserver-<version>-SNAPSHOT-ogcapi-<service>-plugin.zip. Unzip them and drop all their content in the
webapps/geoserver/WEB-INF/lib
folder of your GeoServer directory. - In the GeoServer bin directory, locate the
start.ini
file, open it, and change the propertyjetty.http.port
to8083
, so as not to conflict with other applications that might be running on 8080. The rest of this training assumes GeoServer is running on port8083
. - If you are using Java 17 or later, move into
webapss/geoserver/WEB-INF/lib
and remove the file namedmarlin-<version>.jar
(e.g.marlin-0.9.3.jar
).
Setting environment variables¶
You will need to set the JAVA_HOME
environment variable if it is not already set.
This is the path to your JRE such that %JAVA_HOME%\bin\java.exe
exists.
To set the JAVA_HOME
in Linux/OSX
run the following commands:
export JAVA_HOME=/path/to/jre
export PATH=$JAVA_HOME/bin:$PATH
To set the JAVA_HOME
in Windows
:
- Navigate to .
- Under System variables click New.
- For Variable name enter
JAVA_HOME
. For Variable value enter the path to your JDK/JRE. - Click OK three times.
Running¶
To start GeoServer:
- On
Linux/OSX
open the terminal, navigate to the root directory of you GeoServer installation and runbin/startup.sh
. - On
Windows
runstartup.bat
inside thebin
folder. A command-line window will appear and persist. This window contains diagnostic and troubleshooting information. This window must be left open, otherwise GeoServer will shut down.
Once GeoServer is running:
- Navigate to
http://localhost:8083/geoserver
to access the GeoServer home. - Check that ogcapi modules are installed by looking on the left side of the GeoServer home page. Under the section Service Capabilities you should have the following links:
Stopping¶
To shut down GeoServer:
- On
Linux/OSX
pressCTRL-C
on the terminal where GeoServer is running. - On
Windows
either close the persistent command-line window, or run theshutdown.bat
file inside thebin
directory.
Uninstallation¶
- Stop GeoServer (if it is running).
- Delete the directory where GeoServer is installed.