GeoNetwork 2.4.2

Setup the MySQL Database for Geonetwork to Use

  1. From the command prompt on the instance, type the following commands:
    mysqladmin create geonetwork -u root -p

    You will be prompted for the password for the root MySQL user.

  2. Define a geonetwork MySQL user with permissions on the new database:
    mysql -u root -p (enter password when prompted)
    grant all privileges on geonetwork.* to 'geonetwork'@'localhost' identified by 'password';
    grant all privileges on geonetwork.* to 'geonetwork'@'159.87.39.14' identified by 'password';
  3. In order to populate the database for GeoNetwork's use, you'll need to have GAST installed on a remote machine at the IP address used in the "grant" line above. Using the GAST tool on that remote machine, you can connect to the MySQL database you just made using the geonetwork user, and use the Setup tool to add the tables and data that are needed. 
Installing GeoNetwork 2.4.2
  1. First, you'll want to make an install script that looks like this:
    <AutomatedInstallation langpack="eng">
        <com.izforge.izpack.panels.HelloPanel/>
        <com.izforge.izpack.panels.HTMLLicencePanel/>
        <com.izforge.izpack.panels.TargetPanel>
            <installpath>/mnt/data-store/geonetwork</installpath>
        </com.izforge.izpack.panels.TargetPanel>
        <com.izforge.izpack.panels.PacksPanel>
            <selected>
                <pack index="0"/>
    	    <pack index="1"/>
                <pack index="2"/>
    	    <pack index="3"/>
            </selected>
        </com.izforge.izpack.panels.PacksPanel>
        <com.izforge.izpack.panels.InstallPanel/>
        <com.izforge.izpack.panels.ShortcutPanel/>
        <com.izforge.izpack.panels.HTMLInfoPanel/>
        <com.izforge.izpack.panels.FinishPanel/>
    </AutomatedInstallation>
    
    Note that you can specify the install location. You'll want it to be on the Elastic Data Store somewhere.
  2. Create a directory for GeoNetwork to live, switch to it and download the executable .jar file to install it. Upload the install script to this directory as well.
    mkdir /mnt/data-store/geonetwork
    cd /mnt/data-store/geonetwork
    wget http://downloads.sourceforge.net/project/geonetwork/GeoNetwork_opensource/v2.4.2/geonetwork-install-2.4.2-0.jar?use_mirror=softlayer
    
    

     

  3. Install Geonetwork with the following command:
    java -DTRACE=true -jar geonetwork-install-2.4.2-0.jar <path to your install script>

 

Point GeoNetwork at the MySQL Backend

You'll be editing a file located at /mnt/data-store/geonetwork/web/geonetwork/WEB-INF/config.xml. Find the <resources> node and its children. Make the changes outlined below in bold:

	<resources>
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
		<!-- mckoi standalone -->
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

		<resource enabled="false">
			<name>main-db</name>
			<provider>jeeves.resources.dbms.DbmsPool</provider>
			<config>
				<user>xRgAPQLl</user>
				<password>X7ByXqvJ</password>
				<driver>com.mckoi.JDBCDriver</driver>
				<url>jdbc:mckoi://localhost:9157/</url>
				<poolSize>10</poolSize>
			</config>


		<activator class="org.fao.geonet.activators.McKoiActivator"><configFile>WEB-INF/db/db.conf</configFile></activator></resource>

		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
		<!-- mysql -->
		<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

		<resource enabled="true">
			<name>main-db</name>
			<provider>jeeves.resources.dbms.DbmsPool</provider>
			<config>
				<user>geonetwork</user>
				<password>password</password>
				<driver>com.mysql.jdbc.Driver</driver>
				<url>jdbc:mysql://localhost:3306/geonetwork</url>
				<poolSize>10</poolSize>
				<reconnectTime>3600</reconnectTime>
			</config>
		</resource>

 

Adjust GeoServer's Data Directory

GeoNetwork comes with a simple GeoServer installation that is used to draw the basemaps in the Intermap application. The default installation does not point GeoServer at the right place to find its data. Make the following change to/mnt/data-store/geonetwork/web/geoserver/WEB-INF/web.xml:

<context-param>
       <param-name>GEOSERVER_DATA_DIR</param-name>
        <param-value>/mnt/data-store/geonetwork/data/geoserver_data</param-value>
    </context-param> 

 

Adjust GeoNetwork Folder Permissions

There's probably a more elegant way to handle this, but for now....

chown -R tomcat6:tomcat6 /mnt/data-store/geonetwork

 

Add Context Snippets for Tomcat

In /etc/tomcat6/Catalina/localhost, place three files:

geonetwork.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- configuration to point tomcat at geonetwork directory at root of file system -->
<Context docBase="/mnt/data-store/geonetwork242/web/geonetwork" path="/geonetwork"></Context>

intermap.xml

<!-- configuration to point tomcat at intermap (map on the web interface for 
geonetwork; geoserver map client) directory at root of file system -->
<Context docBase="/mnt/data-store/geonetwork242/web/intermap" path="/intermap"></Context>

geoserver.xml

<?xml version="1.0" encoding="UTF-8"?><!-- configuration to point tomcat at geoserver (WMS service etc.) directory at 
root of file system -->
<Context docBase="/mnt/data-store/geonetwork242/web/geoserver" path="/geoserver"></Context>

 

Restart Tomcat

/etc/init.d/tomcat6 restart
Related Community Groups
CSW Debug Blog | 17 Posts | Join
A group blog to discuss metadata Catalog Service for the Web (CSW) implementation experiences
Building a GeoSciML WFS Server | 11 Posts | Join
Development, testing and implementation of a WFS service that returns GeoSciML documents
ETL Debug Blog | 12 Posts | Join
A group blog on implementing and debugging Extract-Transform-Load (ETL) efforts.
Presentations and Posters | 12 Posts | Join
Post your posters and presentations related to USGIN topics.
Metadata interest group | 13 Posts | Join
group for general posting on metadata content, standards, tools
USGIN Amazon Virtual Server Development | 18 Posts | Invite only
Documenting the process of development of a Web Server in the Amazon EC2 environment. Software installations tailored to the requirements for USGIN
GeoNetwork configuration and development | 7 Posts | Join
Discussion on GeoNetwork setup, configuration, and development.
Student Projects | 0 Posts | Join
Discussion of student projects related to USGIN
Drupal Development | 6 Posts | Join
All about bending Drupal to your needs
Geoportal on an Amazon Virtual Machine | 3 Posts | Closed
Installation, configuration, etc.
Using Django for USGIN | 7 Posts | Request membership
Thought and ideas about using Django to accomplish USGIN-related... things.
ArcGIS Server and OGC Services | 3 Posts | Join
Tips on using ArcGIS Server to provide OGC web services
Content model discussion | 0 Posts | Request membership
Community site for comments on development of content models and encoding for information intechange
Making Web Maps | 2 Posts | Request membership
For information about the myriad of mechanisms for showing service data on a web page.
Troubleshooting Web Service Deployment - Blog | 5 Posts | Join
This blog is for documenting our group's experiences with web service deployment.
Best Practices for USGIN Web Service Hosting | 10 Posts | Join
Tips, techniques, and frequently asked questions for hosting AASG Geothermal Data Web Map Services and Web Feature Services
Hub Disaster Recovery | 0 Posts | Request membership
Discussions around how to harden a distributed federated system against disaster; setting up a system to mirror hub VMs at other hubs.