Personal tools
You are here: Home Documentation How-tos Installing GeoNetwork 2.1.0 on Ubuntu
Document Actions

Installing GeoNetwork 2.1.0 on Ubuntu

This How-to applies to: 2.1

This is an updated how-to based on Paul Grzeszczak's original How-To. It walks through the installation process on Ubuntu (tested against 7.10 - the Gutsy Gibbon) and includes setting up the included GeoServer, backing the registry onto a PostgreSQL database and hosting GeoNetwork in Tomcat server through Apache.

The original how-to is available here: http://geonetwork-opensource.org/documentation/how-to/installation-on-ubuntu

It is assumed that Ubuntu is installed and configured.

Java 6

1. Install Java 6 (JDK)

 sudo apt-get install sun-java6-jdk

2. Set Java 6 as the default installation

 sudo update-java-alternatives -s java-6-sun

Tomcat

1. Install Tomcat.

 sudo apt-get install tomcat5.5

2. Configure Tomcat.

 sudo vi /etc/default/tomcat5.5
Ensure the following lines are present (and uncommented):
 JAVA_HOME=/usr/lib/jvm/java-6-sun
TOMCAT5_SECURITY=no

3. Restart Tomcat.

 sudo /etc/init.d/tomcat5.5 restart

PostgreSQL

1. Install PostgreSQL server, clients and languages. 

    It may be worth looking more closely at this, as it likely installs more than you need.

 sudo apt-get install postgresql-.*-8.2

2. Initialize and run instance.

 sudo mkdir /var/pg_data
sudo chown postgres:postgres /var/pg_data
su postgres
/usr/lib/postgresql/8.2/bin/initdb /var/pg_data
/usr/lib/postgresql/8.2/bin/pg_ctl -D /var/pg_data -l /var/log/pg_logs/pg.log start
exit

3. Create GeoNetwork user and database.

 createuser -SDRlP -U postgres geonetwork
createdb -O geonetwork geonetwork

GeoNetwork

1. Download and install GeoNetwork.

    This downloads from my sourceforge mirror.  Substitute a more appropriate one if you aren't in Australia.

 wget http://optusnet.dl.sourceforge.net/sourceforge/geonetwork/geonetwork-install-2.1.0.jar
sudo java -jar geonetwork-install-2.1.0.jar
1. click Next
2. Read and accept licence
3. Use default location (/usr/local/geonetwork), click Next
4. Install Core and GeoServer Map Server
5. Await installation
6. Do not install sample metadata
7. Install shortcuts
8. Ignore getting started
9. Done

2. Configure Tomcat server.

 sudo vi /usr/share/tomcat5.5/conf/server.xml
1. Within the Host element, add:
 <Context path="/geonetwork" 
docBase="/usr/local/geonetwork/web/geonetwork/"
crossContext="false"
debug="0"
reloadable="false" />
<Context path="/intermap"
docBase="/usr/local/geonetwork/web/intermap/"
crossContext="false"
debug="0"
reloadable="false" />
2. Update permissions
 sudo chown -R tomcat55 /usr/local/geonetwork/web*
3. Restart tomcat
 sudo /etc/init.d/tomcat5.5 restart

Apache

1. Install Apache and mod_jk (to integrate Tomcat).

 sudo apt-get install apache2 libapache2-mod-jk

2. Configure jk.

 sudo vi /etc/apache2/mods-available/jk.conf

          Add the lines:

 JkWorkersFile  /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkShmFile /var/log/apache2/mod_jk.shm
JkLogLevel /info

3. Configure workers.

 sudo vi /etc/apache2/workers.properties

          Add the lines:

 worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

4. Enable mod_jk

 sudo a2dismod jk
sudo a2enmod jk

5. Create site configuration

 sudo vi /etc/apache2/sites-available/geonetwork
          Add the lines:
 <IfModule mod_jk.c>
Alias /geonetwork /usr/local/geonetwork/web/
JkMount /geonetwork/* worker1
Alias /intermap /usr/local/geonetwork/web/
JkMount /intermap/* worker1
Alias /geoserver /usr/local/geonetwork/web/
JkMount /geoserver/* worker1
</IfModule>

6. Enable site

 sudo a2ensite geonetwork

7. Restart Apache

 sudo /etc/init.d/apache2 force-reload

Configure GeoNetwork

1. Run GAST

 sudo java -jar /usr/local/geonetwork/gast/gast.jar

2. Configure DBMS

1. Select Configuration->DBMS from the left menu
2. Select PostgreSQL from the DBMS list
3. Enter the following options:
 Server   localhost
Port 5432
Database geonetwork
Username geonetwork
Password gn
4. Select Save

3. Setup Database

1. Select Database->Setup from left menu
2. Click Setup
3. Click Yes to erase current database (make sure it's empty)
4. Ignore cyclic reference warning

4. Close GAST

5. Check GeoNetwork site

 http://localhost/geonetwork


That's it.  You should now have GeoNetwork running against PostgreSQL, served through Apache.  Many thanks for Paul for doing the initial heavy lifting.
by Mark Leslie last modified 2008-05-05 00:54
Contributors: Paul Grzeszczak (though he doesn't know it yet)
Creative Commons - http://creativecommons.org/licenses/by/2.5/

problemas de instalacion

Posted by Luis Andres Laporta at 2008-08-19 08:29
buen dia, les escribo, porque se me presenta el siguiente problema, "type Informe de estado mensaje /geonetwork/srv/en/main.home descripción El recurso requerido (/geonetwork/srv/en/main.home) no está disponible", instalé el geonetwork 2.1.0 sobre debian etch 4.0, (mi idea es poder tenerlo en una maquina y conectarlo a postgre, y permitir que 4 personas mas, puedan agregar y modificar la metadata, a traves de una pequeña intranet), segui la guia de instalacion sobre ubuntu, guardando las distancias entre las distribuciones, y todo perfecto, hasta el momento que intento probar los servicios, el intermap sirve, pero el geonetwork y geoserver, no funcionan, sale el informe de error antes mencionado, espero puedan ayudarme, disculpen las molestia.

problemas de instalacion

Posted by Rengifo Ortega at 2009-02-04 13:17
Estimado amigo Luis,
Le respondieron la pregunta? Yo segui la instalación de Paul Grzeszczak y logre hacer la instalación sin problema. El problema que Usted tiene parecer provenir del server. Le sugiero que revise paso a paso la instalación.Especialmente en el paso donde se integran ambos (Tomcat y apache2). Tambien asegurese que ningun otro servidor este usando este puerto (localhost).
Saludos y buena suerte
Rengifo

Problemas de Instalación

Posted by Nator at 2010-03-09 03:29
Yo acabo de instalar siguiendo todos los pasos, todo aparentemente funciona. He instalado la versión 2.4.2 en Tomcat 6 pero me da el mismo problema. Además no puedo entrar con http://localhost/geonetwork tengo que entrar con http://localhost/geonetwork. Y el error es "The requested URL /geonetwork/srv/en/main.home was not found on this server."

Gracias cualquier ayuda será bienvenida.

Creative Commons License
This work is licensed under a Creative Commons Attribution-No Derivative Works 3.0 Unported License.

Powered by Plone CMS, the Open Source Content Management System