Cancel Fullscreen
Loading...
 

This is the static archive copy of the old wiswiki, decommissioned on June 1 2020

Print

geonetworkdoc

Some info about geonetwork.


BluenetMEST can be used as synonym for geonetwork in this article.



general notes


WMO recommends installing Geonetwork in a Tomcat container together with a DBMS such as MySQL and not to use Jetty and the McKoi DB when installing on a server machine. Doing this is easy and can be done in 4 easy steps. See next section for more details.
The following supposes a linux machine, but can be easily adapted to a windows machine.

1. installing Tomcat and MySQL

This can be done using a packetmanager on any linux distribution. Versions 5 or 6 are ok for Tomcat. Any recent version of MySQL is ok, too. Create a database and a user for Geonetwork in MySQL.

2. installing Geonetwork

Download the latest installer and install the software. Configure and populate the MySQL database with the geonetwork default files by running GAST.

3. deploying Geonetwork

Tomcat serves its applications from a folder known as "webapps". Copy the Geonetwork application files to this folder and adjust permission and logging.

4. (re)starting Tomcat

Start Tomcat so that it notices the new application. Check the Tomcat and Geonetwork logfiles for (unlikely) error messages.


installation on Linux with Tomcat and MySQL (details)


1. installing Tomcat and MySQL


Tomcat and MySQL can be installed using yum on Redhat or yast on OpenSUSE or any other packet manager. The default settings should be ok.
Connect the MySQL server and create a database geonetwork. Also create a user geonetwork having password secrect and give it full access to the newly created geonetwork database.

mysql> create database geonetwork;
mysql> CREATE USER 'geonetwork'@'localhost' IDENTIFIED BY 'secret';
mysql> GRANT ALL PRIVILEGES ON geonetwork.* TO 'geonetwork'@'localhost'



2. installing Geonetwork

The installer can be downloaded here. The installation in then launched with
bash> java -jar BlueNetMEST-install-1.4-unstable.jar
.
X forwarding can be used to get the graphical installer via ssh from the server to the workstation if you work remotely.
For WMO purposes only the core Geonetwork and no Geoserver or Sourcecode is needed.
Geonetwork can be installed into any directory, since the webapplication files will later be copied anyway to the Tomcat webapplication directory.
GAST, the Geonetwork configuration tool, is run by typing
bash> ./gast.sh
in the subdirectory bin of the Geonetwork installation directory. Select MySQL in the DBMS menu and input the MySQL server address, the database name and the password into the form. Then initialize the DB by clicking on "setup" in the "setup" menu.

3. deploying Geonetwork


Tomcat has a directory called webapps, where webapplications (such as Geonetwork) are placed. This directory is /usr/share/tomcat5/webapps (Redhat) /srv/tomcat6/webapps (Opensuse) or similar.
In order to integrate Geonetwork with Tomcat, simply copy BlueNetMEST_1.4_Unstable/web/geonetwork and BlueNetMEST_1.4_Unstable/web/intermap to the Tomcat webapp directory. Then give the tomcat-user ownership of the files.
For example on OpenSUSE.
bash> cp -ar /usr/local/BlueNetMEST_1.4_Unstable/web/geonetwork /srv/tomcat6/webapps
bash> cp -ar /usr/local/BlueNetMEST_1.4_Unstable/web/intermap /srv/tomcat6/webapps
bash> chown -R tomcat /srv/tomcat6/webapps/geonetwork
bash> chown -R tomcat /srv/tomcat6/webapps/intermap


In order to setup the logging correctly, edit webapps/geonetwork/WEB-INF/log4j.cfg and webapps/intermap/WEB-INF/log4j.cfg. Set the logfile path to a logging directory. e.G in OpenSUSE /var/log/tomcat6/geonetwork.log and /var/log/tomcat6/intermap.log

Important: By copying the files away from the initial installation directory they will not pick up changes made by future runs of GAST. This does not apply to changes of the Database, since it is accessed from GAST and Tomcat.

4. (re)starting Tomcat


Restart Tomcat to let it pick up the new applications.
You can now monitor the logfiles for Tomcat and Geonetwork for startup messages.

bash> rctomcat6 restart 
bash> tail -f /var/log/tomcat6/catalina.out
bash> tail -f /var/log/tomcat6/geonetwork.log


Now make sure that tomcat is started automatically upon reboot using the distributions mechanism (chkconfig) and geonetwork is ready for production.


5. Troubleshooting


Sometimes there are issues when the McKoi DB is used. The configuration file for MyKOI is located in webapps/geonetwork/WEB-INF/db/db.conf. Check it for relative paths. e.g "database_path=./data". Write "database_path=data" instead.

When there are concurrency problems using McKOI, uncomment the configuration option #transaction_error_on_dirty_select=disabled" in the McKoi configuration file.
This means to disable the option "transaction_error_on_dirty_select".


For additional information you can have a look at http://trac.osgeo.org/geonetwork/wiki/HowToRunUnderTomcat and http://geonetwork-opensource.org/documentation/how-to/installing-geonetwork-2-1-0-on-ubuntu, which cover more details and additional ways to integrate geonetwork with the apache webserver.

If the map on the portal does not show up, or there is a small box "error" coming up, this points to a problem with the Intermap service.
The Intermap service is a webapplication installed together with geonetwork, that provides map services to Geonetwork. It pulls in maps either from a local geoserver installation or from any other remote map server.
WMO recommends for testing not to use a local geoserver. If during the installation of geonetwork the geoserver was not installed, the Intermap service will not intend to get a map from a local geoserver installation. However, if the Geoserver was installed together with Geonetwork, but has not been deployed or is not working, there will be a problem with the map.
The file to configure the remote map servers is at webapps/intermap/WEB-INF/mapServers.xml. It usually helps to remove references to local mapservers from the mapServers.xml file.
Remove <server> </server> elements referencing 127.0.0.1 or localhost from both the mapServers and mapContexts sections.
Intermap can be tested by pointing your bowser to http://yourserver:8080/intermap (if geonetwork is at http://yourserver:8080/geonetwork.


Geonetwork and Databases


Geonetwork can be deployed with different databases as backend. Apart from fully fledged DBMs such as MySQL,Oracle and PostgreSQL, a simple file based database named McKoi is supported.
Since geonetwork uses a separate lucene index for searching, the performance of the databse is not crucial, and medium sized installations can be deployed using McKoi, since the DB is only used to retrieve the actual documents identified by a lucene index and for storing configuration and access control parameters.
However, using a separate DB has advantages with respect to ease of management and updatability. While the file based McKoi DB files risk to be overwritten or getting corrupted during updates, this is less likely to happen if a separate DB such as MySQL or Postgres is used, since they encapsulate data.
There is, however, the additional management aspect of administering an additional server process that comes with using a separate DB.
WMO recommends using a separate DB for productions systems, while initial testing can be done using McKoi, the breaking point being reached when a larger amount of metadata is permanent input into geonetwork.

The DB can be configured either by running GAST or by editing the file geonetwork/WEB-INF/config.xml (look for the <resources> section and enable/disable the preconfigured oracle,McKoi,MySQL sections). Don't forget to set the right username and password.



Running GAST


Once the contents of web/* have been deployed to the webapps directory, running GAST in the original installation directory does not change the files that have been deployed already.
Overwriting them with the ones of the original installation after running GAST also overwrites the local Gast DB, and undoes file-permission and other changes.
One solution to this is to use a linux softlink to link the original installation directory and the one in the webapps dir (ln -s /tmp/geonetwork/web/geonetwork /srv/tomcat6/webapps/geonetwork), but this does not work with windows and might have long term management issues.
Having the DB separated in MySQL or Oracle, solves problems associated with the DB, since the DB can accessed from GAST and the deployed system (that way GAST can re-initialize the DB used by the deployed GN).
One can also edit e.g GN database configuration directly instead of using GAST, by editing geonetwork/WEB-INF/config.xml (see above).

Localization


Geonetwork can be localizaed. Here is a some info on how to achive this http://trac.osgeo.org/geonetwork/wiki/HowToTranslate.

For i18n see http://trac.osgeo.org/geonetwork/wiki/i18n

For localization copy the folder web\geonetwork\loc\en to web\geonetwork\loc\your_language
and translate the contained files.

Customization

In order to change the logos, go into the folder web\geonetwork\images and replace the images header-right.gif and header-left.jpg.

In order to change the whole look and feel, the xsl files have to be modified. (Geonetwork generates its HTML output by merging xls files with GN generated content).
There files are located in geonetwork\xsl. Important files are main.xsl, main-page.xsl, header.xsl.







Page last modified on Tuesday 11 of May, 2010 19:31:49 CEST