Installation and Configuration Examples
Example 1
* from Tom Kralidis
Environment
- os: fc10
- db: MySQL 5.0.67
- java: 1.5.0_06
- apache: 2.2.10
- tomcat: 6.0.18
- Other notes:
- required to run on port 80 (tomcat is tied to apache via proxy_ajp)
- no X11 capability (restricted to command line only)
Steps
- create a MySQL geonetwork db instance
$ mysqladmin create geonetwork
- Create a u/p for the database
> grant select, insert, update, delete, drop, alter, create on table geonetwork.* to geonetwork@’localhost’ identified by ‘password’;
- download and build GeoNetwork source (either latest stable or svn trunk [I'm using SVN trunk])
$ svn co http://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk ./geonetwork
$ cd geonetwork && ant
- update web/geonetwork/WEB-INF/config.xml
- in geonet/resources, set the McKoi resource to resource/@enabled="false"
- in geonet/resources, set the MySQL resource to resource/@enabled="true"
- In the MySQL XML definition:
- set resource/config/user to the username you set in MySQL
- set resource/config/password to the password you set in MySQL
- set resource/config/url to jdbc:mysql://HOSTNAME:PORT/DATABASE_NAME
- run GAST
$ cd geonetwork/gast && java -jar ./gast.jar -setupdb
- Update tomcat configuration (in $CATALINA_HOME/conf/server.xml, inServer/Service/Engine/Host)
<!-- geonetwork -->
<Context path="/geonetwork" docBase="/path/to/geonetwork/web/geonetwork" reloadable="true"/>
<Context path="/intermap" docBase="/path/to/geonetwork/web/intermap"/>
<Context path="/geoserver" docBase="/path/to/geonetwork/web/geoserver"/>
<Context path="/geonetwork/docs" docBase="/path/to/geonetwork/docs"/>
- Update the Apache proxy_ajp configuration (mine was in /etc/httpd/conf.d/proxy_ajp.conf)
ProxyPass /geonetwork ajp://localhost:8009/geonetwork/
ProxyPass /geoserver ajp://localhost:8009/geoserver/
ProxyPass /intermap ajp://localhost:8009/intermap/
ProxyPass /geonetwork/docs ajp://localhost:8009/geonetwork/docs/
- Restart tomcat (service tomcat6 restart OR $CATALINA_HOME/bin/shutdown.sh && $CATALINA_HOME/bin/startup.sh)
- Restart Apache (service httpd restart OR /path/to/apachectl restart)
10. Go to http://HOSTNAME/geonetwork
Other info
- you have to set $SERVLET manually in gast/data/index.html. gast.jar usually sets this up through X11.
- if you make changes to the source code, running ant at the root of the dist builds the code again with the changes. You shouldn't have to reboot tomcat or apache
