Skip to content

Deploy GeoNetwork Enterprise

Install GeoNetwork Enterprise package

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

  1. The download instructions provided a zip archive with the following files:

    • geonetwork.war
    • license.html
    • release_notes.html
  2. Stop the Tomcat service.

    Open Tomcat Manager using start menu: Start → Tomcat → Tomcat Manager

    Navigate to the General tab, locate Server Status, and press Stop button.

    Using service command:

    sudo service tomcat9 stop
    

    Using systemctrl command:

    systemctl stop tomcat
    

    It is important to follow the instructions to stop the service before deploying geonetwork.war.

    • Ensure the JNDI connection is setup with the expected jdbc driver in $CATALINA_HOME/lib.

    • We are stopping the service while installing the geonetwork web application to prevent tomcat performing an automatic undeploy / deploy cycle to update the applicaiton in place.

      The undeploy step replaces the Catalina/localhost/geonetwork.xml which is used for JNDI connection details.

  3. Deploy geonetwork.war web archive:

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

    Open the webapps folder.

    Copy the geonetwork.war web archive (from your GeoNetwork Enterprise download) to webapps folder.

    When tomcat starts up it will deploy the geoserver.war web application creating a folder webapps/geonetwork for the running application.

    Copy the geonetwork.war file to the $CATALINA_HOME/webapps folder.

    ` bash cp /tmp/geonetwork-enterprise/geonetwork.war -d $CATALINA_HOME/webapps/

    During startup tomcat will automaticity deploy the web-archive file and create a $CATALINA_HOME/webapps/geonetwork folder.

    Copy the geonetwork.war file to the $CATALINA_HOME/webapps folder.

    cp /tmp/geonetwork-enterprise/geonetwork.war -d $CATALINA_HOME/webapps/
    

    During startup tomcat will automaticity deploy the web-archive file and create a $CATALINA_HOME/webapps/geonetwork folder.

    Some care with jdbc drivers is required when installing with JNDI, this requires a manual deploy process.

    Unzip geonetwork.war to $CATALINA_HOME/webapps/geonetwork folder.

    cd $CATALINA_HOME
    unzip /tmp/geonetwork-enterprise/geonetwork.war -d $CATALINA_HOME/webapps/
    

    Copy the postgresql driver from $CATALINA_HOME/webapps/geonetwork/WEB-INF/lib/ to $CATALINA_HOME/lib

    cp /webapps/geonetwork/WEB-INF/lib/postgresql-*.jar $CATALINA_HOME/lib
    

    Note

    It is important not to have the jdbcdriver appear in both $CATALINA_HOME/webapps/geonetwork/WEB-INF/lib/``** and **$CATALINA_HOME/lib`.

    If the driver appears twice it can produce confusing "class cast exceptions" failures between the conenction supplied by JNDI, and the connection implementation expected by geonetwork.

    Even if the version number of the driver is identical having two postgresql drivers available will cause failure.

  4. Start Tomcat.

    Using Tomcat Manager navigate to the General tab, Locate Server Status, and press Stop button.

    Using service command:

    sudo service tomcat9 start
    

    Using systemctrl command:

    systemctl start tomcat
    

    During startup a database connection pool is setup using:

    • Catalina/localhost/geonetwork.xml connection parameters

    • jdbc driver is obtained from $CATALINA_HOME/lib

Configure the Geonetwork data directory

The data directory is the location on the file system where the catalog stores much of its custom configuration and uploaded files. This configuration defines such things as:

  • uploaded documents and thumbnails attached to metadata records.
  • logos.
  • schema plugins.
  • index configuration files.

The data directory configuration can be set using different methods:

The default configuration of the data directory is in the $CATALINA_HOME/webapps/geonetwork/data folder, inside the catalog web application.

It is a good idea to define an external data directory in order to make future updates easier, and to avoid losing your metadata files or logos when updating GeoNetwork.

Although some of these files are better configured to be used in it's default location in the the catalog web application, like the schema plugins and index configuration files, as can be updated in newer versions.

The following configuration externalises the data directory to a folder /data/catalogue outside the tomcat installation, while keeping the schema plugins and index configuration files in the default location, to facilitate future updates.

The following environmental variables should be defined:

  • GEONETWORK_DIR: Path for the data directory.
  • GEONETWORK_SCHEMA_DIR: Path for the schemas directory (if not defined, defaults to GEONETWORK_DIR/config/schema_plugins).
  • GEONETWORK_INDEXCONFIG_DIR: Path for the index configuration directory (if not defined, defaults to GEONETWORK_DIR/config/index).

Example setenv.sh configuration, configuring the data directory to /data/catalogue outside the tomcat installation, while keeping the schema plugins and index configuration files in the default location:

export GEONETWORK_DIR=/data/catalogue
export GEONETWORK_SCHEMA_DIR=$CATALINA_HOME/webapps/geonetwork/WEB-INF/data/config/schema_plugins
export GEONETWORK_INDEXCONFIG_DIR=$CATALINA_HOME/webapps/geonetwork/WEB-INF/data/config/index

An alternative method to configure the data directory is to use Java System Properties, adding to JAVA_OPTS the following parameters, that externalises the data directory to a folder /data/catalogue outside the tomcat installation, while keeping the schema plugins and index configuration files in the default location:

  • -Dgeonetwork.dir=/data/catalogue
  • -Dgeonetwork.schema.dir=${CATALINA_HOME}/webapps/geonetwork/WEB-INF/data/config/schema_plugins
  • -Dgeonetwork.indexConfig.dir=${CATALINA_HOME}/webapps/geonetwork/WEB-INF/data/config/index

Example setenv.sh configuration, doing the same:

# append Elasticseach configuration
JAVA_OPTS="${JAVA_OPTS} -Dgeonetwork.dir=/data/catalogue -Dgeonetwork.schema.dir=${CATALINA_HOME}/webapps/geonetwork/WEB-INF/data/config/schema_plugins -Dgeonetwork.indexConfig.dir=${CATALINA_HOME}/webapps/geonetwork/WEB-INF/data/config/index"

References: