"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

Install GeoNetwork Trunk 2.7.x


This document outlines steps of clean install of GeoNetwork Trunk 2.7.x on a target server, the guide and RIF-CS patch described in this guide are based on GeoNetwork svn revision 8059.

This document also explains how to enable RIF-CS harvester.

GeoNetwork running dependencies

  1. Database : MySQL is GeoNetwork preferred option, Postgres is another popular option (this guide uses PostgreSQL).
  2. A target 1.6 web container (Tomcat6 using Java6)


  1. The following are required for building GeoNetwork installation files from source:
  2. GeoNetwork setup is a graphical installer, the following softwares are required on your machine to run the installer on a remote server;

Prepare GeoNetwork installer

  1. The following installation guide are base on the actual guide from : http://geonetwork-opensource.org/manuals/trunk/developer/development/index.html#build-geonetwork.
  2. Build GeoNetwork on local machine:
    • Checkout:
      • svn co https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk GeoNetwork-trunk
    • Apply the RIF-CS patch:
      • download the patch in here Geonetwork 2.7.x
      • follow the instruction in README.txt
      • NOTE : the RIF-CS patch generated base on svn revision 8059, it may not work with other revision
    • Use Maven to build the source
      • mvn package
    • Now create the installer (if you want)
      • cd GeoNetwork-trunk/installer
      • ant installer

Create a database

  1. PostgreSQL example:
    • Create new user :
      user ~ $ sudo su postgres
      user ~ $ createuser geonetowrk -s -P  (-s superuser, -P to prompt password)
    • Create a new geonetwork db instance :
      postgres ~ $ psql
      postgres=# CREATE DATABASE geonetwork WITH OWNER=geonetwork ENCODING 'UTF8' TEMPLATE=template_postgis;
      postgres=# \q
      postgres ~ $ exit
      user ~ $   

Install Geonetwork

  1. Upload geonetwork-install-2.7.0-SNAPSHOT.jar to the remote server.
  2. Start Xming and login as root to yourserver with X forwarding enabled in Putty:
    • putty1.jpg
    • putty2.jpg
  3. Stop tomcat: /etc/init.d/tomcat6 stop
  4. Run installer: java -jar geonetwork-install-2.7.0-SNAPSHOT.jar(Note : For Debian 5, we need to use sudo -E to maintain the existing environment setting e.g. sudo -E java -jar geonetwork-install-2.7.0-SNAPSHOT.jar)
    • Use /usr/local/geonetwork as installation directory.
    • When choosing the packs to install, make sure the "GeoNetwork User Interface (experimental)" is checked if you require Thesauri function in GeoNetwork :
      • selectpacks.jpg
    • After installation is finished press "Done".

Post installation configuration

  1. Configure geonetwork log file location, and downgrade logging level to WARN (INFO if have to) (/usr/local/geonetwork/web/geonetwork/WEB-INF/log4j.cfg)
    log4j.rootLogger = OFF
    log4j.logger.geonetwork.sru         = WARN
    log4j.logger.geonetwork.sru.search  = WARN
    log4j.logger.jeeves      = WARN, jeeves, console
    log4j.logger.jeeves.xlinkprocessor = WARN
    log4j.logger.com.k_int=WARN, console, jeeves
    log4j.logger.org.jzkit=WARN, console, jeeves
    log4j.logger.org.jzkit.search.impl.LRUCache = WARN, console,jeeves
  2. Change the help file link in /usr/local/geonetwork/web/geonetwork/xsl/banner.xsl (line 87 and 90) to following:
       <xsl:when test="/root/gui/language='fr'">
          <a class="banner" href="http://geonetwork-opensource.org/manuals/trunk/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
          <a class="banner" href="http://geonetwork-opensource.org/manuals/trunk/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
  3. configure default map layers (maps in search panel and map viewer panel): By default geonetwork uses localhost to serve its maps. If GeoServer is not installed, make the following changes to /usr/local/geonetwork/web/geonetwork /WEB-INF/config-gui.xml, so that public maps are used instead of local maps.
    Mapsearch section:(line 79)
    <mapSearch options=.......>
          <layer server="http://www2.demis.nl/wms/wms.ashx?WMS=BlueMarble" tocName="Map" params="{layers: 'Earth Image,Borders,Coastlines', format: 'image/jpeg'}" options="{isBaseLayer: true}" />
    Map viewer section:(line 99)
    <mapViewer options=.......>
          <layer server="http://www2.demis.nl/wms/wms.ashx?WMS=BlueMarble" tocName="Borders"  params="{layers: 'Borders,Coastlines', transparent: 'true', format: 'image/png'}"  options="{}" />
          <layer server="http://www2.demis.nl/wms/wms.ashx?WMS=BlueMarble" tocName="Ortophoto" params="{layers: 'Earth Image', format: 'image/jpeg'}" options="{isBaseLayer: true}" />
       <scales values=......... />
  4. Geonetwork will create database tables at start-up and will use default Mckoi database specify in /usr/local/geonetwork/web/geonetwork/WEB-INF/config.xml. Follow the following to turn the default database off and enabled PostgreSQL daatbase:
    • Turn off default Mckoi database
      <resource enabled="false">
    • Configure PostgreSQL database
      <resource enabled="true">
      <!-- <provider>jeeves.resources.dbms.DbmsPool</provider> -->
            <!-- we use org.postgis.DriverWrapper in place of org.postgresql.Driver to support both postgresql and postgis -->
            or if you are using postgis and want the spatial index loaded into postgis
  5. Separate database connection information to another xml file (optional step) :
    • Create another xml file, e.g. config-db-ext.xml
    • Extract the database connection information from config.xml file into config-db-ext.xml :
      <!-- we use org.postgis.DriverWrapper in place of org.postgresql.Driver to support both postgresql and postgis -->
      or if you are using postgis and want the spatial index loaded into postgis
    • Append the following line to the top of config.xml (after ) :
      <!DOCTYPE doc [ <!ENTITY dbFile SYSTEM "config-db-ext.xml"> ]> 
    • Edit the postgresql database connection section in config.xml :
      <resource enabled="true">
      <!-- <provider>jeeves.resources.dbms.DbmsPool</provider> -->
  6. Change the schemaPluginsDir in /usr/local/geonetwork/web/geonetwork/WEB-INF/config.xml
    <!--<param name="schemaPluginsDir" value="../../schemaPlugins" />-->
    <param name="schemaPluginsDir" value="xml/schemas" />
  7. Make Tomcat the owner of the geonetwork installation directory:
    • chown -R tomcat6:tomcat6 /usr/local/geonetwork

Configure Tomcat and Apache

  • Add GeoNetwork application to tomcat
    • Create a file for geonetwork context /etc/tomcat6/Catalina/localhost/geonetwork.xml, with content:
      <Context path="/geonetwork" docBase="/usr/local/geonetwork/web/geonetwork" crossContext="false" debug="0" reloadable="false" /> 
    • Exposing GeoNetwork via your Apache frontend
    • Mount the proxy interface (/etc/apache2/sites-available/default)
      ProxyPass /geonetwork/ ajp://localhost:8009/geonetwork/ 
      ProxyPassReverse /geonetwork/ ajp://localhost:8009/geonetwork/ 
    • Start Tomcat and Apahce

Secure and configure GeoNetwork

Change OAI Provider Datesearch type

  1. In system configuration, under OAI Provider, change Datesearch from temporal extent to modification date. This change needs a Tomcat restart to take effect.
  2. The above change is intended for ANDS RIF-CS harvester to collect all geonetwork records to Research Data Australia. ANDS harvester issues OAI request to geonetwork such as http://server/geonetwork/srv/en/oaipmh&method=RIF&from=2000-01-20T13:00:15&until=2011-01-20T13:00:15. The parameter from date is the earliestDatestamp of an OAI Identify response, the until date is the current date. Since not all records have temporal extent but modification date, records based on modification date should be returned to ANDS.

Enable Editing Harvested Record

  1. In System configuration, under HARVESTING, check the box for "Allow editing on harvested records".
  2. Restart Tomcat : /etc/init.d/tomcat6 restart

Add Metadata Schema/Profile

  1. In Administration, select Add a metadata schema/profile
  2. Enter the name and path of the schema zip archive:
    • name of the schemas has to be in the format of profile., e.g. ANZLIC profile should be named as iso19139.anzlic
    • schemaplugin1.jpg

Add Templates

  1. In Administration, look for Add tempaltes and samples. A list of schemas including the one added thru Add Metadata Schema/Profile will be listed.
  2. Select the schema (e.g. iso19139.anzlic) and click on Add templatesbutton
    • schemaplugin2.jpg
    • NOTE : DO NOT CLICK MORE THAN ONCE, as this will cause duplicate records of template being added to the database

Turn on RIF-CS harvester

  1. RIF-CS harvester is turned on by applying the patch as described above.
  2. For the later added Metadata Schema/Profile, you need to copy the rif.xsl and activities.xml from Geonetwork 2.7.x and paste it to the /usr/local/geonetwork/xml/schemas/new profile schema dir/convert directory manually.
  3. The rif.xsl and activities.xml in Geonetwork 2.7.x are customised to work for AuScope. You can also find the example of rif.xls and activities.xml for ANZLIC profile created for BOM here.
  4. Make changes accordingly to the converter (rif.xls) for your system if required. (e.g group, origSource, discoveryLink etc).
  5. The RIF-CS activities mapping is implemented in a manual manner. For each harvesting node in Geonetwork, there is a manually created activity. The matching between an activity and an collection is based on the harvesting url which is unique to a harvesting node.
  6. To test the RIF-CS harvester, issue the request: http://server/geonetwork/srv/en/oaipmh?verb=ListRecords&metadataPrefix=rif. By default, the maximum records return from the request is 10 records. To view the complete lists, use the Resumption Token. Copy the value of the resumptionToken at the end of the result page (e.g.
    <resumptionToken expirationDate="2011-09-15T06:42:42">/-/rif/-//-//-/xq7zo54t5gn5/-/10</resumptionToken>
    Make another request: http://server/geonetwork/srv/en/oaipmh?verb=ListRecords&resumptionToken=/-/rif/-//-//-/xq7zo54t5gn5/-/10.
  7. For more information about ANDS RIF-CS harvester, refer to https://www.seegrid.csiro.au/wiki/Infosrvices/AndsRifcs.
  8. For more information about RIF-CS format, refer to http://www.ands.org.au/guides/content-providers-guide.html.

Testing Geonetwork

  1. Restart Tomcat : /etc/init.d/tomcat6 restart to ensure all changes done are loaded.
  2. Point your browser to http://yourserver/geonetwork and login as admin user.
  3. Add a metadata record (manual add)
  4. Add a harvester (auto-record)
  5. Search and view the metadata record(s)

Important Note

  1. 17/Aug/2011 - Further test on GeoNetwork trunk with RIF-CS patch had found that the oaipmh request filter base on date (e.g. http://localhost:8080/geonetwork/srv/en/oaipmh?verb=ListRecords&metadataPrefix=rif&from=2003-08-11T13:00:15&until=2011-08-17T00:00:00) will filter base on gmd:dateStamp/gco:DateTime in the metadata rather than the modified date. For BOM Geofabric, workaround is to edit the original gmd:dateStamp/gco:Date to gmd:dateStamp/gco:DateTime. For BOM Catalog, ETL will set the gmd:dateStamp/gclDateTime to the created date time and modified date time.
  2. 19/Aug/2011 - Jacque commented that the GeoNetwork trunk installed in the test server "Manage Thesauri" page is empty (from Admininistration->Thesauri and classification systems-> Manage thesauri). Further investigation found that if the "GeoNetwork User Interface (experimental)" options is not selected during the installation, then no interface would be available for "Manage Thesauri".
Topic attachments
I Attachment Action Size Date Who Comment
putty1.jpgjpg putty1.jpg manage 43.0 K 16 Aug 2011 - 14:20 FlorenceTan Allow agent forwarding
putty2.jpgjpg putty2.jpg manage 33.5 K 16 Aug 2011 - 14:20 FlorenceTan Enable X11 forwarding
schemaplugin1.jpgjpg schemaplugin1.jpg manage 111.2 K 16 Aug 2011 - 14:21 FlorenceTan Add a metadata schema/profile
schemaplugin2.jpgjpg schemaplugin2.jpg manage 109.7 K 16 Aug 2011 - 14:21 FlorenceTan Add templates
selectpacks.jpgjpg selectpacks.jpg manage 44.3 K 31 Aug 2011 - 13:57 FlorenceTan Packs available for installation
Topic revision: r18 - 07 Aug 2012, RiniAngreani

Current license: All material on this collaboration platform is licensed under a Creative Commons Attribution 3.0 Australia Licence (CC BY 3.0).