Deploy GeoNetwork Enterprise
Install GeoNetwork Enterprise package
To install GeoNetwork Enterprise on your existing Tomcat instance, follow these steps:
-
The download instructions provided a zip archive with the following files:
geonetwork.warlicense.htmlrelease_notes.html
-
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.
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.xmlwhich is used for JNDI connection details.
-
-
Deploy
geonetwork.warweb archive:Open the Tomcat Program folder by using the Start menu to select Apache Tomcat → Tomcat Program Directory.
Open the
webappsfolder.Copy the
geonetwork.warweb archive (from your GeoNetwork Enterprise download) towebappsfolder.When tomcat starts up it will deploy the
geoserver.warweb application creating a folderwebapps/geonetworkfor the running application.Copy the
geonetwork.warfile to the$CATALINA_HOME/webappsfolder.` 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/geonetworkfolder.Copy the
geonetwork.warfile to the$CATALINA_HOME/webappsfolder.During startup tomcat will automaticity deploy the web-archive file and create a
$CATALINA_HOME/webapps/geonetworkfolder.Some care with jdbc drivers is required when installing with JNDI, this requires a manual deploy process.
Unzip
geonetwork.warto$CATALINA_HOME/webapps/geonetworkfolder.Copy the postgresql driver from
$CATALINA_HOME/webapps/geonetwork/WEB-INF/lib/to$CATALINA_HOME/libNote
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.
-
Start Tomcat.
Using Tomcat Manager navigate to the General tab, Locate Server Status, and press Stop button.
During startup a database connection pool is setup using:
-
Catalina/localhost/geonetwork.xmlconnection 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 toGEONETWORK_DIR/config/schema_plugins).GEONETWORK_INDEXCONFIG_DIR: Path for the index configuration directory (if not defined, defaults toGEONETWORK_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:
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:
References: