Installation

This section describes the steps needed to install GeoGig.

Pre-requisites

GeoGig requires a Java 8 runtime environment. If not already on your system, install a Java JDK. Make sure the java executable is accessible (i.e. check your PATH environment variable) and the JAVA_HOME environment variable points to the JDK or JRE installation directory.

Command line executable

Pre-built binaries are available for GeoGig.

  1. After the JDK is installed, navigate to the project’s releases page https://github.com/locationtech/geogig/releases/ and download the latest release. For example, geogig-1.1.0.zip.

  2. Extract this archive to your preferred program directory. (For example, C:\Program Files\GeoGig or /opt/geogig.)

    Note

    The same packages can be used on Windows, OS X, and Linux.

  3. Add the bin directory to your PATH environment variable.

    • OS X

      1. Open Terminal from the Utilities folder in the Applications directory.
      2. Open the bash profile with nano.
      $ nano ~/.bash_profile
      
      1. Specify the java home directory inside the profile by adding the following line to the end of the file.
      export JAVA_HOME=$(/usr/libexec/java_home)
      
      1. Add the bin directory from your GeoGig install location to the PATH by adding the following line at the end of the file. In this case, GeoGig was extracted to /opt/geogig.
      export PATH=$PATH:/opt/geogig/bin
      
      1. Save the bash profile with Ctrl+O, and exit using Ctrl+X.
      2. Reload the profile.
      $ source ~/.bash_profile
      
      1. Verify GeoGig functionality.
      $ geogig --help
      usage: geogig [--repo <URI>] <command> [<args>]
      
      The most commonly used geogig commands are:
      ...
      
    • Windows

      1. Open up System from the Windows control panel and click on Advanced system settings. Depending on how your control panel is displayed, this may be under the System and Security section.
      2. Click on Environment Variables.
      3. Look through the System Variables section and find the PATH (or Path) variable and click Edit.... If it does not exist, click New...
      4. Add the bin directory from your GeoGig install location by adding the following path to the end of the existing value, separated by a semicolon. In this case, GeoGig was extracted to C:\Program Files\GeoGig.
      C:\Program Files\GeoGig\bin
      

      Note

      In newer versions of windows, the Path variable will be displayed as a list. In this case, simply add a new entry for the above path.

      1. Click OK through each window to save the changes.
      2. Verify GeoGig functionality in a new Command Prompt window.
      > geogig --help
      usage: geogig [--repo <URI>] <command> [<args>]
      
      The most commonly used geogig commands are:
      ...
      

When finished, you should be able to run the geogig --help and see the command usage.

GeoServer plug-in

A GeoServer extension is available to allow GeoServer to interact with a GeoGig repository and use it as a datastore. It enables a GeoGig repository to be exposed as a remote for cloning, pushing, and pulling, as well as to publish its data via OGC services.

The GeoServer GeoGig plug-in binaries are pre-compiled and ready to be downloaded for the most recent versions of GeoServer. Refer to the project’s releases page https://github.com/locationtech/geogig/releases/ and download the latest release. For example, GeoServer 2.11.x plugin.

Once downloaded, unzip the contensts of the geoserver-<version>-geogig-plugin.zip file inside GeoServer’s WEB-INF/lib directory and restart GeoServer.

For information on how to configure GeoGig on GeoServer, refer to the GeoServer GUI configuration and GeoServer REST configuration integration sections.

PostgreSQL JDBC Driver version

GeoServer versions lower than 2.12 come with an older version of the PostgreSQL JDBC driver than the one required by GeoGig. GeoGig requires version 42.1.1 (included in the geogig plugin zip file as postgresql-42.1.1.jar), while GeoServer comes with version 9.4.1211.

GeoGig needs the above mentioned version or higher in order to be able to transferring data to and from the postgres database in pure binary form.

Given the way servlet containers (such as Apache Tomcat or Jetty) work, if the two jar files end up being in GeoSevrer’s WEB-INF/lib folder, one or the other may be loaded first, in a non deterministic way. Hence you’ll need to remove the older jar file from GeoSevrer’s WEB-INF/lib folder before restarting GeoServer and after installing the GeoGig plugin as described above.

Note GeoGig will verify the correct driver version is in use and won’t work if the old driver is still installed and loaded.

Building from source code

If you’re interested in building GeoGig yourself, go to the project’s source code repository and follow the instructions there: https://github.com/locationtech/geogig

Running on Windows

GeoGig for Windows is only available for Windows 64-bit versions.

GeoGig uses RocksDB as the default storage backend and for some temporary storage needs. On Windows machines, the libraries for RocksDB require the Visual C++ Redistributable for Visual Studio 2015. If you experience an UnsatisfiedLinkError exception when running GeoGig, make sure you have the above dependency installed on your system.

Only Windows 10 supports colored text using ANSI escape sequences. On previous versions of windows, ANSI support can be enabled by installing ANSICON and setting the ansi.enabled config parameter to true. See the config section Configuring a GeoGig repository.

Installing ANSICON

  1. Download the ANSICON zip.
  2. Unzip the file to it’s own location, such as C:\Program Files\Ansicon\
  3. Add the ANSICON location to the Windows PATH, found under System -> Advanced System Properties -> Environment Variables
  4. Open a cmd or powershell terminal and type ansicon to confirm the PATH variable is set correctly. If the PATH is correct information about the Windows version will be printed in the console. This command will enable ANSICON for this terminal session only.
ansicon
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
  1. To make ANSICON load automatically with new terminals type:
ansicon -i
  1. ANSICON is now enabled by default in all terminals.

Uninstalling ANSICON

  1. To remove ANSICON from the terminal defaults type:
ansicon -u
  1. Remove ANSICON from the windows PATH
  2. Delete the ANSICON folder from the location it was installed.

back to top