"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"

GeoNetwork Deployment Procedure

Introduction

GeoNetwork is an open source, platform independent catalogue application to manage spatially referenced metadata. It provides OGC web services (WFS, WMS, etc.) harvesting, OGC-CSW2.0.2 ISO profile client and server, OAI-PMH client and server, and many others. GeoNetwork supports multiple standards, including ISO19139 which we use. More information at http://geonetwork-opensource.org/. Please feel free to contact siss@lists.csiro.au if you require assistance.

Requirements

  1. A web server with at least 1 GB of ram and 512MB of disk space.
  2. An operating system that is compatible with Java (JRE 1.6.0) and Apache Tomcat (or Jetty).
  3. GeoNetwork uses embedded H2 database by default. This should be fine for a small catalogue containing a few thousands of records. You may need a stand alone DBMS database (Oracle, MySQL, Postgresql, etc.) for bigger catalogues.

GeoNetwork Installation

  1. Download the installer from : http://siss.csiro.au/siss/releases/3.1/geonetwork-install-2.10.4-0.jar
    • If installing on Linux, download the jar file.
    • If installing on Windows, download the exe file.
  2. Stop tomcat:
    • etc/init.d/tomcat6 stop
  3. Run installer:
    • java -jar geonetwork-install-2.10.1.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.10.1.jar).
    • Make sure there are no spaces in your installation directory path. For example, you can use /usr/local/geonetwork as installation directory.
    • The embedded GeoServer is optional.
    • http://geonetwork-opensource.org/manuals/trunk/eng/users/admin/gast/index.html is an optional component to assist with database configuration and migration. You can configure the database settings without GAST by editing the web/geonetwork/WEB-INF/config.xml.
    • You will be asked to choose which user interface as default. The HTML5 widgets based user interface is available from GeoNetwork 2.10 on. This can be changed later via the configuration.
      • Which user interface do you want to use?
      • 0 [x] The HTML5 Widgets based user interface
      • 1 [ ] The classic user interface

Configuration

  1. Configure geonetwork log file location, and downgrade logging level to INFO if you 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
    log4j.appender.jeeves.file=/var/log/tomcat6/geonetwork.log 
  2. Configure default map layers (maps in search panel and map viewer panel). By default geonetwork uses localhost to serve its maps. If the embedded 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 85)
      <mapSearch options=.......>
         <layers>
            <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}" />
         </layers>
      </mapSearch>
    • Map viewer section:(line 108)
      <mapViewer options=.......>
         <layers>
            <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}" />
         </layers>
         <scales values=......... />
         <proj>
           .
           .
           .
           .
      </mapViewer>
  3. GeoNetwork will create database tables at start-up and will use default H2 database specified in /usr/local/geonetwork/web/geonetwork/WEB-INF/config.xml. Follow the instructions below to disable the default database and enable PostgreSQL database as an example:
    • Turn off default H2 database
      <resource enabled="false">
    • Configure and enable PostgreSQL database
      <resource enabled="true">
         <name>main-db</name>
         <provider>jeeves.resources.dbms.ApacheDBCPool</provider>
         <config>
            <user>www-data</user>
            <password>www-data</password>
            <driver>org.postgresql.Driver</driver>
            <url>jdbc:postgresql://localhost:5432/geonetwork</url>
            <poolSize>10</poolSize>
            <validationQuery>SELECT 1</validationQuery>
         </config>
      </resource>
  4. Make Tomcat the owner of the geonetwork installation directory:
    • chown -R tomcat6:tomcat6 /usr/local/geonetwork
  5. 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" /> 
    • Expose 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 Apache.
  6. Secure and configure GeoNetwork:
  7. Configure the user interface.
    • From version 2.10, GeoNetwork offers HTML 5 user interface as an alternative to the classic look.
    • You can access the classic user interface with <host>/geonetwork/srv/en/main.home URL.
    • The HTML 5 interface is accessible via <host>/geonetwork/srv/eng/search.
    • You can set the default redirect in web/geonetwork/WEB-INF/config-gui.xml:
      • Classic user interface:
        <client type="redirect" widget="false" url="main.home"/>
      • HTML 5 user interface:
        <client type="redirect" widget="true" url="../../srv/eng/search" createParameter="#create" stateId="s" />
    • More information on the user interface: http://geonetwork-opensource.org/manuals/trunk/eng/developer/userinterface/index.html.
  8. Enable editing harvested records:
    • In System configuration, under HARVESTING, check the box for "Allow editing on harvested records". (This change needs tomcat restart to come into effect.)
  9. Add templates:
    • In Administration, look for Add templates and samples . A list of schemas including the one added thru Add Metadata Schema/Profile will be listed.
    • Select the schema (e.g. iso19139) and click on Add templates button.
    • iso19139.png
    • NOTE : DO NOT CLICK MORE THAN ONCE, as this will cause duplicate records of template being added to the database.
  10. Optional: If you need to provide OAI harvest end point to other parties such as ANDS, you need to change OAI Provider Datesearch type
    • In system configuration, under OAI Provider, change Datesearch from temporal extent to modification date .
    • This change needs a Tomcat restart to take effect.
  11. Optional: Customise the logo for your organisation. More information on: GeoNetworkBranding.
  12. Restart Tomcat.
    • service tomcat6 restart

Create Metadata

You can manually create metadata, import them from existing files or harvest from other end points. GeoNetwork can harvest and automatically create metadata records from OGC services (such as GeoServer).

harvestsetting.png

Below are the steps to harvest metadata from OGC services. Please note you need to add each WMS and WFS metadata for each instance separately.
  1. As admin, go to "Administration" -> "Harvesting Management", and click "Add".
  2. Select "OGC Web services (i.e. WMS, WFS, WCS, etc.)" in "Type" and click "Add".
  3. Enter the appropriate "Name" and "Service URL", e.g. "NVCL WFS" and "services-test.auscope.org/nvcl/wfs".
  4. Select the "Type of OGC webservice", e.g. OGC WFS/WMS 1.1.0 for EarthResourceML and NVCL WFS deployments.
  5. Untick "Use account".
  6. Select "geoscientificInformation" in "ISO topic category".
  7. Tick "Create metadata for layer elements using GetCapabilities information." in "Type of import".
  8. Configure the harvest frequency under "Options".
  9. Under "Privileges", add "All" group, and tick all the checkboxes (View, Interactive map, Featured). Making all your records visible is important to enable other parties to harvest your records.
  10. Select "Datasets" for both "Category For Service" and "Category For Datasets".
  11. Click save.
  12. If you want to run the harvesting now, tick the layer and click "Run". Click "Refresh" to check the status of the harvest. If there are no errors, you should be able to view the harvested records from the "Home" page.
runharvest.png
Topic revision: r13 - 20 Nov 2015, PeterWarren
 

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