- Postgres database with Postgis extensions enabled.
- Tomcat 6
- Java 1.7 (Tested with Java version "1.7.0_45")
In the artifacts 2 war files can be downloaded:
- dataportaal.war : preconfigured with postgresql/postgis.
- geonetwork.war : configured with a local h2 database. Typically used for local testing.
Tomcat 6 Configuration
Set java parameters:
To store indexes and other Geonetwork specific data, pass a java environment data directory to tomcat.
To make sure tomcat has enough memory available, use the following java parameters:
"-Dfile.encoding=UTF-8 -Xms128m -Xmx712m -XX:PermSize=128m -XX:MaxPermSize=128m"
To allow searching in the ISO19139 temporal extent meta data using a When search from the Geonetwork 3 gui, the following java -D parameter should be passed. (Otherwise Geonetwork 3 will only search for creation date and modification date of the metadata.)
On CentOS these settings can be set in the /usr/share/tomcat6/conf/tomcat6.conf file.
- JAVA_OPTS="-Dgeonetwork.dir=/var/lib/geonetwork_data -Dfile.encoding=UTF-8 -Xms128m -Xmx712m -XX:PermSize=128m -XX:MaxPermSize=128m -Dgeonetwork.search.temporal.extent.overrule=true"
On windows the JAVA_OPTS can be added to the sentenv.bat file in the tomcat bin directory.
Set database properties:
Put the jdbc.properties in the tomcat conf directory to override the default jdbc.properties. (download example)
For Geonetwork to work correctly on a server, the hostname and port of the server have to be configured. In the Admin console in the Catalog server section the following fields have to match the servername geonetwork is deployed to:
- Host: for example http://dl-tc006.xtr.deltares.nl/
- Protocol: for example http
- Port: for example 8080
There is another setting that is server dependent:
Resource identifier prefix.http://dl-tc006.xtr.deltares.nl:8080/geonetwork/srv/metadata/
If a new version of Geonetwork becomes available:
- Download the new warfile from https://build.deltares.nl/viewType.html?buildTypeId=Geonetwork_GeonetworkInstall
- Stop tomcat
- Check if all java parameters are up to date in ../tomcat6/conf/tomcat6.conf file (see Tomcat 6 Configuration section)
- Cleanup the cache database that is stored in the directory configured with the -Dgeonetwork.dir option (for example: -Dgeonetwork.dir=/var/lib/geonetwork_data). Remove all wro4j-cache.* files.
- Remove old installation in tomcat directory
- Replace the old .war file with the new warfile in the tomcatdirectory
- Start tomcat
Configuring the Geonetwork 3 sources (This is already done in dataportaal.war version)
N.B.: The following changes in the geonetwork sources have be applied In the openearth repository of geonetwork: https://github.com/openearth/core-geonetwork; these changes have been added to the 3.0.x-deltares branch.
To make Geonetwork 3 use the Postgres with postgis where the spatial indexes are stored in postgis, a new configuration is added. the following has to be changed/added in the "web/src/main/webapp/" directory:
- WEB-INF\config-node\srv.xml --> Change to: <import resource="../config-db/postgres-postgis.xml"/>
- WEB-INF\config-db\postgres-postgis.xml will be added. (content displayed hereafter).
- WEB-INF\config-db\jdbc.properties --> Fill in the database host, portname, username and password (used for local development).
Configure the postgres-postgis.xml file:
Geonetwork uses stopwords to create indexes and to filter them from queries. This leads to unexpected results if a user uses the english user interface and types a dutch query. For example the query "het water" wil be interpreted as an english query. The stopword "het" won't be removed from the query. During indexing dutch documents the stop words will be removed, so only "water" is stored in the index. So searching for "het water" will not find any results.
To work around this issue, the english and dutch stop words have been merged:
Geonetwork uses a generic html header. This leads to problems on some IE installations where the browser is set to favourite IE 7 to display the page instead of a newer iteration. We can force IE to show the page in its newest iteration by changing the metatag to:
The above can be added to the base-layout.xsl which can be found in web/src/main/webapp/xslt. This needs to be changed every update.