Guidelines for migrating GeoNetwork installations

From BlueNet MEST to GeoNetwork trunk on test machine

Preconditions:

Install GeoNetwork trunk

This section describes getting the sources of GeoNetwork, compiling them and installing them on the target host machine.

  • Login as root to auscope-portal-test with X forwarding enabled.
  • Move old BlueNet MEST installation:
    • cd /usr/local
    • mv geonetwork BlueNetMEST.old
  • Checkout and compile GeoNetwork trunk:
  • Install GeoNetwork:
    • cd ../geonetwork-2.4.0/
    • Run installer:
      java -jar geonetwork-install-2.4.0-RC2.jar
    • Use /usr/local/geonetwork as installation directory.
    • Make sure only "Core" is checked.
    • After installation is finished press "Done".
  • Post installation setup:
    • Make Tomcat the owner of the web directory:
      chown -R tomcat55:nogroup /usr/local/geonetwork/web
    • Make Tomcat the owner of the metadata upload directory:
      chown -R tomcat55:nogroup /usr/local/geonetwork/data/tmp
    • Remove geoserver context (from BlueNet MEST):
      vim /etc/tomcat5.5-geonetwork/server.xml

      Remove the line
      <Context path="/geoserver" docBase="/usr/local/geonetwork/web/geoserver" crossContext="false" debug="0" reloadable="false" />

Database setup

  • Change to the GAST directory:
    cd /usr/local/geonetwork/gast
  • Startup GAST:
    java -jar gast.jar
  • Click on "Configuration->DBMS".
  • Choose DBMS "MySQL" and enter the following:
    • Server cgsrv4.arrc.csiro.au
    • Database geonetwork-test
    • Username geonetwork-test
    • Password
  • Click on "Save"
  • Click on "Database->Setup".
  • Click on "Setup" and "Yes".
  • Close GAST.

Re-Import metadata records

  • Restart Tomcat:
    • /etc/init.d/tomcat5.5-geonetwork stop
    • /etc/init.d/tomcat5.5-geonetwork start
  • Change admin password:
    • Login with "Username" admin and Password admin.
    • Click on "Administration".
    • Click on "Change password".
    • Change the password and click "Save".
  • Harvest from old production BlueNet MEST instance:
    • Click on "Harvesting management".
    • Click "Add".
    • Choose "GeoNetwork v2.1 remote node" and click "Add".
    • Enter the following:
      • Name BlueNet MEST production
      • Host auscope-portal.arrc.csiro.au
      • Servlet geonetwork
      • Make sure "Use account" is checked.
      • Username admin
      • Password
      • Check "One run only".
    • Click on "Save".
    • Click on the checkbox under "Select".
    • Click on "Run".
    • After a short time you can click on "Refresh".
    • Mouseover the "Status" and "Errors" icons and make sure the harvesting succeeded.
ALERT! NOTE Never remove the BlueNet MEST production node from harvesting management or all metadata records will be deleted! ALERT!

Got over that problem like this:
  1. Export data again from new node (GeoNetwork trunk): GeoNetworkFailedImport#Back_up_metadata_records
  2. Remove BlueNet MEST production node from harvesting management.
  3. Import data from step one again: GeoNetworkFailedImport#Tried_GAST_Import_feature_it_is
Alternative methods (failed, kept for archiving purposes): GeoNetworkFailedImport

Fixing the lucene search

You have to follow these steps, if lucene is not working because of the following error:
The requested operation could not be performed.

FileNotFoundException : no segments* file found in org.apache.lucene.store.FSDirectory@/usr/local/geonetwork/web/geonetwork/WEB-INF/lucene/nonspatial: files:

  • Copy them to the server into the following directory:
    /usr/local/geonetwork/web/geonetwork/WEB-INF/lucene/nonspatial

Change the permissions of the data records

As default only the administrator has access to the metadata records. To change this follow these steps:

  • Click on "Home".
  • Click "Search".
  • Locate your records and tick the check boxes.
  • Click on "actions on selection" (on the top).
  • Click on "Update privileges".
  • Change it to the following values:
    privileges.png
  • Click "Submit"

From BlueNet MEST to GeoNetwork trunk on production machine

Preconditions:

Backup BlueNet MEST data records

  • cd /usr/local/geonetwork/gast
  • java -jar gast.jar
  • Click on "Options" (at the top!) and on "Config".
  • Click on "External".
    • Enter auscope-portal.arrc.csiro.au in the "Host" field.
    • Enter geonetwork in the "Servlet" field.
  • Go to "Account" and click on "Use this account".
    • Enter admin in the "Username" field.
    • Enter the admin password in the "Password" field.
  • Click on "Ok".
  • Click on "Export" under "Management".
  • Choose /root/BlueNetMEST-production-records to export the metadata records in "Output folder".
  • In the "Format" combobox choose "Full".
  • Click on "Export" and wait until the export is done.
  • Click on the checkbox next to "Templates".
  • Click on "Export" again and wait until it is done.
  • Close GAST (press Alt-F4).

Install GeoNetwork trunk

This section describes installing GeoNetwork trunk on the target host machine.

  • Login as root to auscope-portal with X forwarding enabled.
  • Set CSW service to test GeoNetwork during migration procedure
    • /etc/init.d/tomcat5.5-geonetwork stop
    • rm -r /var/lib/tomcat5.5-geonetwork/webapps/AuScope-Portal
    • /etc/init.d/tomcat5.5-geonetwork start
    • vim /var/lib/tomcat5.5-geonetwork/webapps/AuScope-Portal/WEB-INF/classes/config.properties
      • change: auscope-portal.cswservice.url=http://auscope-portal-test.arrc.csiro.au/geonetwork/srv/en/csw
    • /etc/init.d/tomcat5.5-geonetwork restart
  • Move old BlueNet MEST installation:
    mv /usr/local/geonetwork /usr/local/BlueNetMEST.old
  • Install GeoNetwork:
    • Copy installer jar file:
      scp auscope-portal-test:src/GeoNetwork-trunk/geonetwork-2.4.0/geonetwork-install-2.4.0-RC2.jar ~
    • Run installer:
      java -jar ~/geonetwork-install-2.4.0-RC2.jar
    • Use /usr/local/geonetwork as installation directory.
    • Make sure only the "Core" pack is checked.
    • After installation is finished press "Done".
  • Post installation setup:
    • Make Tomcat the owner of the web directory:
      chown -R tomcat55:nogroup /usr/local/geonetwork/web
    • Make Tomcat the owner of the metadata upload directory:
      chown -R tomcat55:nogroup /usr/local/geonetwork/data/tmp
    • Remove geoserver context (from BlueNet MEST):
      • cp /etc/tomcat5.5-geonetwork/server.xml /etc/tomcat5.5-geonetwork/server.xml.old
      • vim /etc/tomcat5.5-geonetwork/server.xml
      • Remove
        <Context path="/geoserver" docBase="/usr/local/geonetwork/web/geoserver" crossContext="false" debug="0" reloadable="false" />
    • Change log4j settings
      • vim /usr/local/geonetwork/web/geonetwork/WEB-INF/log4j.cfg
      • Change line to: #log4j.rootLogger = OFF
    • /etc/init.d/tomcat5.5-geonetwork restart

Export data records from test GeoNetwork

  • Login as root to auscope-portal-test with X forwarding enabled.
  • cd /usr/local/geonetwork/gast
  • java -jar gast.jar
  • Click on "Options" (at the top!) and on "Config".
  • Click on "External".
    • Enter auscope-portal-test.arrc.csiro.au in the "Host" field.
    • Enter geonetwork in the "Servlet" field.
  • Go to "Account" and click on "Use this account".
    • Enter admin in the "Username" field.
    • Enter the admin password in the "Password" field.
  • Click on "Ok".
  • Click on "Export" under "Management".
  • Choose /root/GeoNetwork-test-records to export the metadata records in "Output folder".
  • In the "Format" combobox choose "Full".
  • Click on "Export" and wait until the export is done.
  • Click on the checkbox next to "Templates".
  • Click on "Export" again and wait until it is done.
  • Close GAST (press Alt-F4).

Database setup on production GeoNetwork

  • Login as root to auscope-portal with X forwarding enabled.
  • scp -r auscope-portal-test:/root/GeoNetwork-test-records ~
  • Change to the GAST directory:
    cd /usr/local/geonetwork/gast
  • Startup GAST:
    java -jar gast.jar
  • Click on "Configuration->DBMS".
  • Choose DBMS "MySQL" and enter the following:
    • Server cgsrv4.arrc.csiro.au
    • Database geonetwork
    • Username geonetwork
    • Password
  • Click on "Save"
  • Click on "Database->Setup".
  • Click on "Setup" and "Yes".
  • Click on "Options" (at the top!) and on "Config".
    • Click on "External".
      • Enter auscope-portal.arrc.csiro.au in the "Host" field.
      • Enter geonetwork in the "Servlet" field.
    • Go to "Account" and click on "Use this account".
      • Enter admin in the "Username" field.
      • Enter the admin password in the "Password" field.
  • Click on "Management->Import".
  • Use "Input folder" /root/GeoNetwork-test-records.
  • Click on "Import".
  • Close GAST (press Alt-F4).
  • Change GeoNetwork admin password:
  • Copy logo files:
    scp -r auscope-portal-test:/usr/local/geonetwork/web/geonetwork/images/logos/* /usr/local/geonetwork/web/geonetwork/images/logos/

Set CSW service to production GeoNetwork

  • /etc/init.d/tomcat5.5-geonetwork stop
  • rm -r /var/lib/tomcat5.5-geonetwork/webapps/AuScope-Portal
  • /etc/init.d/tomcat5.5-geonetwork start
  • /etc/init.d/tomcat5.5-geonetwork restart

Rollback procedure

  • /etc/init.d/tomcat5.5-geonetwork stop
  • cp /etc/tomcat5.5-geonetwork/server.xml.old /etc/tomcat5.5-geonetwork/server.xml
  • rm -r /usr/local/geonetwork
  • cp -r /usr/local/BlueNetMEST.old /usr/local/geonetwork
  • /etc/init.d/tomcat5.5-geonetwork start
  • /etc/init.d/tomcat5.5-geonetwork restart
  • cd /usr/local/geonetwork/gast
  • java -jar gast.jar
  • Click on "Options" (at the top!) and on "Config".
    • Click on "External".
      • Enter auscope-portal.arrc.csiro.au in the "Host" field.
      • Enter geonetwork in the "Servlet" field.
    • Go to "Account" and click on "Use this account".
      • Enter admin in the "Username" field.
      • Enter the admin password in the "Password" field.
  • Click on "Database->Setup".
  • Click on "Setup" and "Yes".
  • Click on "Management->Import".
  • Use "Input folder" /root/BlueNetMEST-production-records.
  • Click on "Import".

From Geonetwork2.4.2 to GeoNetwork 2.4.3 with RIF-CS Patch on test machine

Preconditions:
  • Installed on your machine
    • Xming Xserver (version 6.9.0.31 installer attached). Note: to use with Putty, you need to launch Xming and then start a putty session with "Enable X11 forwarding" ticked in Connection/SSH/X11
    • Apache Ant and Java JDK
    • subversion client
Preparations:
  • Manually backup harvesting nodes (capture screen shots etc.) on the test machine (make sure capture the full service URL).
  • Backup metadata records use GAST on the target server
    • Login to auscope-portal-test with X forwarding enabled
    • cd /usr/local/geonetwork/gast/
    • java –jar gast.jar
    • Click on "Options" (at the top!) and on "Config".
    • Go to "Account" and click on "Use this account".
    • Enter admin in the "Username" field.
    • Enter the admin password in the "Password" field.
    • Click on "Ok".
    • Click on "Export" under "Management".
    • Choose an empty folder to export the metadata records in "Output folder".
    • In the "Format" combobox choose "Full".
    • Click on "Export" and wait until the export is done.
    • Click on the checkbox next to "Templates".
    • Click on "Export" again and wait until it is done.
    • Close GAST (press Alt-F4).
  • Backup MySQL database on the target server
    • Go to here, login as root/root password:
      https://cg-admin.arrc.csiro.au/phpmyadmin/
    • Click the geonetwork-test (20), then click the export tab, then tick all the structure, and export it to a zipped SQL file straight to your desktop.

Prepare GeoNetwork 2.4.3 with RIF-CS installer

Install GeoNetwork 2.4.3 with RIF-CS patch

This section describes installing GeoNetwork 2.4.3 with RIF-CS capability on the target test machine.
  • Login as root to auscope-portal-test with X forwarding enabled.
  • /etc/init.d/tomcat6 stop
  • If you have an old install - move old Geonetwork installation:
    • cd /usr/local
    • mv geonetwork geonetwork-2.4.2
  • Install GeoNetwork:
    • Run installer:
      java -jar geonetwork-install-2.4.3-0.jar
    • Use /usr/local/geonetwork-2.4.3-rifcs as installation directory.
    • After installation is finished press "Done".
  • Post installation setup:
    • Configure origSource,group and discoveryLink in /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/xml/schemas/iso19139/convert/rifcs.xml if required. (line 21, 24, 27)
    • Configure GEOSERVER_DATA_DIR (/usr/local/geonetwork-2.4.3-rifcs/web/geoserver/WEB-INF/web.xml) to:
      /usr/local/geonetwork-2.4.3-rifcs/data/geoserver_data
    • Configure geonetwork log4j properties (/usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/WEB-INF/log4j.cfg)
              log4j.rootLogger= ON
              log4j.appender.jeeves.file=/var/log/tomcat6/geonetwork.log 
    • Configure intermap log4j properties (/usr/local/geonetwork-2.4.3-rifcs/web/intermap/WEB-INF/log4j.cfg)
              log4j.rootLogger= ON
              log4j.appender.jeeves.file=/var/log/tomcat6/intermap.log 
    • Change the help file link in /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/xsl/banner.xsl (line 99 and 102) to following:
              <xsl:choose>
         <xsl:when test="/root/gui/language='fr'">
                  <a class="banner" href="{/root/gui/url}/docs/usermanual/fra/" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:when>
         <xsl:otherwise>
                  <a class="banner" href="{/root/gui/url}/docs/usermanual/eng/" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:otherwise>
              </xsl:choose>
    • Copy files of the old data directory to the new installation
      cp –R /usr/local/geonetwork-2.4.2/data/* /usr/local/geonetwork-2.4.3-rifcs/data
    • Copy files of the old logos directory to the new installation
      cp –R /usr/local/geonetwork-2.4.2/web/geonetwork/images/logos/* /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/images/logos
    • Make Tomcat the owner of the geonetwork installation directory:
      chown -R tomcat6:tomcat6 /usr/local/geonetwork-2.4.3-rifcs
    • Symlink geonetwork directory to geonetwork2.4.3-rifcs directory
      ln –s /usr/local/geonetwork-2.4.3-rifcs /usr/local/geonetwork

Database setup

This section describes configuration of database to use exiting data.
  • Change to the GAST directory:
    cd /usr/local/geonetwork-2.4.3-rifcs/gast
  • Startup GAST:
    java -jar gast.jar
  • Click on "Configuration->DBMS".
  • Choose DBMS "MySQL" and enter the following:
    • Server cgsrv4.arrc.csiro.au
    • Database geonetwork-test
    • Username geonetwork-test
    • Password
  • Click on "Save"
  • Close GAST.
  • Start Tomcat:
    • /etc/init.d/tomcat6 start
    • Wait for a while for tomcat to start, log into Geonetwork and run harvesting process for all harvesting nodes.
    • Geonetwork should be running successfully using existing database.

Re-Import metadata records if geonetwork doesn’t display existing data properly

  • Stop Tomcat:
    • /etc/init.d/tomcat6 stop
  • Startup GAST:
    java -jar gast.jar
  • Click on "Database->Setup".
  • Click on "Setup" and "Yes".
  • Close GAST.

  • Start Tomcat:
    • /etc/init.d/tomcat6 start
  • Change admin password:
    • Login with "Username" admin and Password admin.
    • Click on "Administration".
    • Click on "Change password".
    • Change the password and click "Save".
  • Import all backup metadata records via GAST
    • Startup GAST:
      java -jar gast.jar
    • Click Management->Import
    • Specify the input folder where the backup metadata records sit in.
    • Click Import
    • Close GAST.
  • Add backup harvesting nodes and run harvesting process:
    • Manually add all backup harvesting nodes.
    • Select all checkbox.
    • Click on "Run".
    • After a short time you can click on "Refresh".
    • Mouseover the "Status" and "Errors" icons and make sure the harvesting succeeded.

Rollback installation

  • /etc/init.d/tomcat6 stop
  • unlink /usr/local/geonetwork
  • ln –s /usr/local/geonetwork-2.4.2 /usr/local/geonetwork
  • /etc/init.d/tomcat6 start

From Geonetwork2.4.2 to GeoNetwork 2.4.3 with RIF-CS Patch on production machine

Preconditions:
  • Installed on your machine
    • Xming Xserver (version 6.9.0.31 installer attached)
Preparations:
  • Manually backup harvesting nodes (capture screen shots etc.) on the production machine (make sure capture the full service URL).
  • Backup metadata records use GAST on the target server
    • Login to auscope-portal with X forwarding enabled
    • cd /usr/local/geonetwork/gast/
    • java –jar gast.jar
    • Click on "Options" (at the top!) and on "Config".
    • Go to "Account" and click on "Use this account".
    • Enter admin in the "Username" field.
    • Enter the admin password in the "Password" field.
    • Click on "Ok".
    • Click on "Export" under "Management".
    • Choose an empty folder to export the metadata records in "Output folder".
    • In the "Format" combobox choose "Full".
    • Click on "Export" and wait until the export is done.
    • Click on the checkbox next to "Templates".
    • Click on "Export" again and wait until it is done.
    • Close GAST (press Alt-F4).
  • Backup MySQL database on the target server
    • Go to here, login as root/root password:
      https://cg-admin.arrc.csiro.au/phpmyadmin/
    • Click the geonetwork-production (20), then click the export tab, then tick all the structure, and export it to a zipped SQL file straight to your desktop.

Prepare GeoNetwork 2.4.3 with RIF-CS installer

Install GeoNetwork 2.4.3 with RIF-CS patch

This section describes installing GeoNetwork 2.4.3 with RIF-CS capability on the target production machine.
  • Login as root to auscope-portal with X forwarding enabled.
  • /etc/init.d/tomcat6 stop
  • Move old Geonetwork installation:
    • cd /usr/local
    • mv geonetwork geonetwork-2.4.2
  • Install GeoNetwork:
    • Run installer:
      java -jar geonetwork-install-2.4.3-0.jar
    • Use /usr/local/geonetwork-2.4.3-rifcs as installation directory.
    • After installation is finished press "Done".
  • Post installation setup:
    • Configure origSource,group and discoveryLink in /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/xml/schemas/iso19139/convert/rifcs.xml if required. (line 21, 24, 27)
    • Configure GEOSERVER_DATA_DIR (/usr/local/geonetwork-2.4.3-rifcs/web/geoserver/WEB-INF/web.xml) to:
      /usr/local/geonetwork-2.4.3-rifcs/data/geoserver_data
    • Configure geonetwork log4j properties (/usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/WEB-INF/log4j.cfg)
              log4j.rootLogger= ON
              log4j.appender.jeeves.file=/var/log/tomcat6/geonetwork.log 
    • Configure intermap log4j properties (/usr/local/geonetwork-2.4.3-rifcs/web/intermap/WEB-INF/log4j.cfg)
              log4j.rootLogger= ON
              log4j.appender.jeeves.file=/var/log/tomcat6/intermap.log 
    • Change the help file link in /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/xsl/banner.xsl (line 99 and 102) to following:
              <xsl:choose>
         <xsl:when test="/root/gui/language='fr'">
                  <a class="banner" href="{/root/gui/url}/docs/usermanual/fra/" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:when>
         <xsl:otherwise>
                  <a class="banner" href="{/root/gui/url}/docs/usermanual/eng/" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:otherwise>
              </xsl:choose>
    • Copy files of the old data directory to the new installation
      cp –R /usr/local/geonetwork-2.4.2/data/* /usr/local/geonetwork-2.4.3-rifcs/data
    • Copy files of the old logos directory to the new installation
      cp –R /usr/local/geonetwork-2.4.2/web/geonetwork/images/logos/* /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/images/logos
    • Make Tomcat the owner of the geonetwork installation directory:
      chown -R tomcat6:tomcat6 /usr/local/geonetwork-2.4.3-rifcs
    • Symlink geonetwork directory to geonetwork2.4.3-rifcs directory
      ln –s /usr/local/geonetwork-2.4.3-rifcs /usr/local/geonetwork

Database setup

This section describes configuration of database to use exiting data.
  • Change to the GAST directory:
    cd /usr/local/geonetwork-2.4.3-rifcs/gast
  • Startup GAST:
    java -jar gast.jar
  • Click on "Configuration->DBMS".
  • Choose DBMS "MySQL" and enter the following:
    • Server cgsrv4.arrc.csiro.au
    • Database geonetwork-production
    • Username geonetwork
    • Password
  • Click on "Save"
  • Close GAST.
  • Start Tomcat:
    • /etc/init.d/tomcat6 start
    • Wait for a while for tomcat to start, log into Geonetwork and run harvesting process for all harvesting nodes.
    • Geonetwork should be running successfully using existing database.

Re-Import metadata records if geonetwork doesn’t display existing data properly

  • Stop Tomcat:
    • /etc/init.d/tomcat6 stop
  • Startup GAST:
    java -jar gast.jar
  • Click on "Database->Setup".
  • Click on "Setup" and "Yes".
  • Close GAST.

  • Start Tomcat:
    • /etc/init.d/tomcat6 start
  • Change admin password:
    • Login with "Username" admin and Password admin.
    • Click on "Administration".
    • Click on "Change password".
    • Change the password and click "Save".
  • Import all backup metadata records via GAST
    • Startup GAST:
      java -jar gast.jar
    • Click Management->Import
    • Specify the input folder where the backup metadata records sit in.
    • Click Import
    • Close GAST.
  • Add backup harvesting nodes and run harvesting process:
    • Manually add all backup harvesting nodes.
    • Select all checkbox.
    • Click on "Run".
    • After a short time you can click on "Refresh".
    • Mouseover the "Status" and "Errors" icons and make sure the harvesting succeeded.

Configure Zserver port number for ASDD harverster

Rollback installation

  • /etc/init.d/tomcat6 stop
  • unlink /usr/local/geonetwork
  • ln –s /usr/local/geonetwork-2.4.2 /usr/local/geonetwork
  • /etc/init.d/tomcat6 start

From Geonetwork 2.4.3 to GeoNetwork 2.6.3 on auscope-portal-2

Preconditions:
  • Installed on your machine
    • Xming Xserver (version 6.9.0.31 installer attached). Note: to use with Putty, you need to launch Xming and then start a putty session with "Enable X11 forwarding" ticked in Connection/SSH/X11
    • Apache Ant and Java JDK
    • subversion client
Database backup:
  • Backup MySQL database for rollback if the upgrade fails
    • Login to https://cg-admin.arrc.csiro.au/phpmyadmin/ as root/root password
    • Click the geonetwork-test (20), then click the export tab, then tick all the structure, and export it to a zipped SQL file straight to your desktop.

Build and upload GeoNetwork 2.6.3 installer

Install GeoNetwork 2.6.3

This section describes installing GeoNetwork 2.6.3 on the target test machine.
  • Login to auscope-portal-test with X forwarding enabled.
  • Switch to root privilege (password required):
    sudo -s
  • /etc/init.d/tomcat6 stop
  • Install GeoNetwork:
    • Run installer:
      java -jar geonetwork-install-2.6.3-0.jar
    • Use /usr/local/geonetwork-2.6.3 as installation directory.
    • After installation is finished press "Done".
  • Post installation setup:
    • Configure origSource,group and discoveryLink in /usr/local/geonetwork-2.6.3/web/geonetwork/xml/schemas/iso19139/convert/rif.xml if required. (line 21, 24, 27)
    • Configure geonetwork log file location, and downgrade logging level to WARN (/usr/local/geonetwork-2.6.3/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 
    • Change the help file link in /usr/local/geonetwork-2.6.3/web/geonetwork/xsl/banner.xsl (line 99 and 102) to following:
              <xsl:choose>
         <xsl:when test="/root/gui/language='fr'">
                  <a class="banner" href="http://geonetwork-opensource.org/manuals/2.6.3/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:when>
         <xsl:otherwise>
                  <a class="banner" href="http://geonetwork-opensource.org/manuals/2.6.3/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:otherwise>
              </xsl:choose>
    • Copy files of the old data directory to the new installation
      cp -R /usr/local/geonetwork-2.4.3-rifcs/data/* /usr/local/geonetwork-2.6.3/data
    • Copy files of the old logos directory to the new installation
      cp -R /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/images/logos/* /usr/local/geonetwork-2.6.3/web/geonetwork/images/logos
    • enable editing harvested record in /usr/local/geonetwork/web/geonetwork-2.6.3 /WEB-INF/config-gui.xml:
      <allow-editing-for-harvested-record>1</allow-editing-for-harvested-record> 
    • 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-2.6.3 /WEB-INF/config-gui.xml, so that public maps are used instead of local maps.
      Mapsearch section:
         <mapSearch>
            <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:
         <mapViewer>
            <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>   
         </mapViewer> 
         
    • Geoserver is not embedded in Geonetwork 2.6.x. To run Geonetwork at localhost, configure the geoserver context file /etc/tomcat6/Catalina/localhost/geoserver.xml to run geoserver from an ealier version:
      /usr/local/geonetwork-2.4.3-rifcs/web/geoserver
    • Make Tomcat the owner of the geonetwork installation directory:
      chown -R tomcat6:tomcat6 /usr/local/geonetwork-2.6.3
    • Symlink geonetwork directory to geonetwork2.6.3 directory
      unlink /usr/local/geonetwork
      ln -s /usr/local/geonetwork-2.6.3 /usr/local/geonetwork

Database migration

There are DB changes from GN2.4.3 to GN2.6.3. In phpmyadmin, execute the customised migration script mysql.sql ( DB upgrade scripts). The migration script shipped with GN 2.6.3 has potential conflicts when updating the Settings table, as it assumes the existing database has no harvesting nodes, so that duplicate ids are allocated.

Geonetwork Database configuration

Edit /usr/local/geonetwork-2.6.3/web/geonetwork/WEB-INF/config.xml.

Geonetwork2.6.x creates tables at start-up, there is no need to use GAST-Database Setup.

The default user in the User table is admin/admin.
  • Turn off default Mckoi database
        <resource enabled="false">  
  • Configure MySql database
    <resource enabled="true"> 
    <name>main-db</name> 
    <provider>jeeves.resources.dbms.DbmsPool</provider> 
    <config>
    <user>geonetwork-test</user> 
    <password>ask cg-admin</password> 
    <driver>com.mysql.jdbc.Driver</driver> 
    <url>jdbc:mysql://cgsrv4.arrc.csiro.au/geonetwork-test</url> 
    <poolSize>10</poolSize> 
    </config>
    </resource> 

Start and test Geonetwork

Rollback installation

  • /etc/init.d/tomcat6 stop
  • unlink /usr/local/geonetwork
  • ln -s /usr/local/geonetwork-2.4.3-rifcs /usr/local/geonetwork
  • Rollback database. In phpmyadmin, run sql scripts drop-new-tables.sql ( DB upgrade scripts) and geonetwork-test.sql (mysql database backup file) against the geonetwork-test database.
  • /etc/init.d/tomcat6 start

From Geonetwork 2.4.3 to GeoNetwork 2.6.3 on auscope-portal production server

Preconditions:
  • Installed on your machine
    • Xming Xserver (version 6.9.0.31 installer attached). Note: to use with Putty, you need to launch Xming and then start a putty session with "Enable X11 forwarding" ticked in Connection/SSH/X11
    • Apache Ant and Java JDK
    • subversion client
Database backup:
  • Backup MySQL database for rollback if the upgrade fails
    • Login to https://cg-admin.arrc.csiro.au/phpmyadmin/ as root/root password
    • Click the geonetwork-production (20), then click the export tab, then tick all the structure, and export it to a zipped SQL file straight to your desktop.

Build and upload GeoNetwork 2.6.3 installer

Install GeoNetwork 2.6.3

This section describes installing GeoNetwork 2.6.3 on the target production machine.
  • Login to auscope-portal with X forwarding enabled.
  • Switch to root privilege (password required):
    sudo -s
  • /etc/init.d/tomcat6 stop
  • Install GeoNetwork:
    • Run installer:
      java -jar geonetwork-install-2.6.3-0.jar
    • Use /usr/local/geonetwork-2.6.3 as installation directory.
    • After installation is finished press "Done".
  • Post installation setup:
    • Configure origSource,group and discoveryLink in /usr/local/geonetwork-2.6.3/web/geonetwork/xml/schemas/iso19139/convert/rif.xml if required. (line 21, 24, 27)
    • Configure geonetwork log file location, and downgrade logging level to WARN (/usr/local/geonetwork-2.6.3/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 
    • Change the help file link in /usr/local/geonetwork-2.6.3/web/geonetwork/xsl/banner.xsl (line 99 and 102) to following:
              <xsl:choose>
         <xsl:when test="/root/gui/language='fr'">
                  <a class="banner" href="http://geonetwork-opensource.org/manuals/2.6.3/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:when>
         <xsl:otherwise>
                  <a class="banner" href="http://geonetwork-opensource.org/manuals/2.6.3/users/index.html" target="_blank"><xsl:value-of select="/root/gui/strings/help"/></a>
         </xsl:otherwise>
              </xsl:choose>
    • Copy files of the old data directory to the new installation
      cp -R /usr/local/geonetwork-2.4.3-rifcs/data/* /usr/local/geonetwork-2.6.3/data
    • Copy files of the old logos directory to the new installation
      cp -R /usr/local/geonetwork-2.4.3-rifcs/web/geonetwork/images/logos/* /usr/local/geonetwork-2.6.3/web/geonetwork/images/logos
    • enable editing harvested record in /usr/local/geonetwork/web/geonetwork-2.6.3 /WEB-INF/config-gui.xml:
      <allow-editing-for-harvested-record>1</allow-editing-for-harvested-record> 
    • 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-2.6.3 /WEB-INF/config-gui.xml, so that public maps are used instead of local maps.
      Mapsearch section:
         <mapSearch>
            <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:
         <mapViewer>
            <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>   
         </mapViewer> 
         
    • Geoserver is not embedded in Geonetwork 2.6.x. To run Geonetwork at localhost, configure the geoserver context file /etc/tomcat6/Catalina/localhost/geoserver.xml to run geoserver from an ealier version:
      /usr/local/geonetwork-2.4.3-rifcs/web/geoserver
    • Make Tomcat the owner of the geonetwork installation directory:
      chown -R tomcat6:tomcat6 /usr/local/geonetwork-2.6.3
    • Symlink geonetwork directory to geonetwork2.6.3 directory
      unlink /usr/local/geonetwork
      ln -s /usr/local/geonetwork-2.6.3 /usr/local/geonetwork

Database migration

There are DB changes from GN2.4.3 to GN2.6.3. In phpmyadmin, execute the customised migration script mysql.sql against geonetwork-production database ( DB upgrade scripts). The migration script shipped with GN 2.6.3 has potential conflicts when updating the Settings table, as it assumes the existing database has no harvesting nodes, so that duplicate ids are allocated.

Geonetwork Database configuration

Edit /usr/local/geonetwork-2.6.3/web/geonetwork/WEB-INF/config.xml.

Geonetwork2.6.x creates tables at start-up, there is no need to use GAST-Database Setup.

The default user in the User table is admin/admin.
  • Turn off default Mckoi database
        <resource enabled="false">  
  • Configure MySql database
    <resource enabled="true"> 
    <name>main-db</name> 
    <provider>jeeves.resources.dbms.DbmsPool</provider> 
          <config>
          <user>geonetwork</user> 
          <password>ask cg-admin</password> 
          <driver>com.mysql.jdbc.Driver</driver> 
          <url>jdbc:mysql://cgsrv4.arrc.csiro.au/geonetwork-production</url> 
          <poolSize>10</poolSize> 
       </config>
    </resource> 

Start and test Geonetwork

Check Zserver port number for ASDD harvester

Change OAI Provider Datesearch type for ANDS harvester

  • In system configuration, under OAI Provider, change Datesearch from temporal extent to modification date. This change needs a tomcat restart to take effect.
  • AuScope is engaged with ANDS to provide metadata to Research Data Australia. To collect Geonetwork metadata, ANDS harvester issues OAI request to geonetwork such as http://server/geonetwork/srv/en/oaipmh&verb=ListRecords&metadataPrefix=RIF&from=2000-01-20T13:00:15&until=2011-01-20T13:00:15. The from parameter is the earliestDatestamp of 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.
  • /etc/init.d/tomcat6 restart

Rollback installation

  • /etc/init.d/tomcat6 stop
  • unlink /usr/local/geonetwork
  • ln -s /usr/local/geonetwork-2.4.3-rifcs /usr/local/geonetwork
  • Rollback database. In phpmyadmin, run sql scripts drop-new-tables.sql ( DB upgrade scripts) and geonetwork-production.sql (mysql database backup file) against the geonetwork-production database.
  • /etc/init.d/tomcat6 start
-- XiangtanLin - 07 Feb 2011
 
Topic attachments
I Attachment Action Size Date Who Comment
Xming-6-9-0-31-setup.zipzip Xming-6-9-0-31-setup.zip manage 2120.8 K 08 Sep 2010 - 11:55 XiangtanLin xming server installer
lucene-nonspatial-files-geonetwork-trunk.zipzip lucene-nonspatial-files-geonetwork-trunk.zip manage 14.9 K 11 Jun 2009 - 17:05 MichaelStegherr Lucene files from a GeoNetwork 2.4.0-trunk version
privileges.pngpng privileges.png manage 5.7 K 12 Jun 2009 - 16:14 MichaelStegherr Screenshot of privileges editing form
Topic revision: r52 - 06 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).