Changes between Version 1 and Version 2 of HowToRunMultipleGeonetworkInstancesUnderTomcat
- Timestamp:
- Nov 7, 2013, 8:58:14 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowToRunMultipleGeonetworkInstancesUnderTomcat
v1 v2 1 = How to run Multiple instances of Geonetwork in a single Tomcat server =1 = How to run Multiple instances of !GeoNetwork in a single Tomcat server = 2 2 3 3 == What is it you want to do? == 4 When GNis installed it typically becomes available at the URL http://domain.etc:8080/geonetwork. If you want a second copy running you might start a second instance of tomcat on another port e.g. http://domain.etc:8090/geonetwork. Instead I want to be able to run both copies in the same Tomcat server at different names rather than ports. e.g. http://domain.etc/geonetwork_test, http://domain.etc/geonetwork etc.4 When !GeoNetwork is installed it typically becomes available at the URL http://domain.etc:8080/geonetwork. If you want a second copy running you might start a second instance of tomcat on another port e.g. http://domain.etc:8090/geonetwork. Instead I want to be able to run both copies in the same Tomcat server at different names rather than ports. e.g. http://domain.etc/geonetwork_test, http://domain.etc/geonetwork etc. 5 5 6 6 == Why would you want to do this? == 7 1. You may wish to run several separate copies of Geonetwork for test and development purposes. e.g a dev, test and production version. Each instance can be started and stopped independently, can connect to different schemas on the database etc.7 1. You may wish to run several separate copies of !GeoNetwork for test and development purposes. e.g a dev, test and production version. Each instance can be started and stopped independently, can connect to different schemas on the database etc. 8 8 9 2. You may wish to run two separate portals for Geonetwork containing different collections of metadata from two organisations. You may wish to have separate branding and titles.9 2. You may wish to run two separate portals for !GeoNetwork containing different collections of metadata from two organisations. You may wish to have separate branding and titles. 10 10 11 11 == Summary of changes == … … 16 16 17 17 These changes can be made in the original source code or after installation as a post install customisation. For the purposes of this how to I will assume the following : 18 * Geonetwork is installed in /usr/local/geonetwork and is running as http://domain.etc/geonetwork18 * !GeoNetwork is installed in /usr/local/geonetwork and is running as http://domain.etc/geonetwork 19 19 * Tomcat is installed in /opt/tomcat 20 20 * You want a second copy to be installed in /usr/local/geonetwork_test and available as http://domain.etc/geonetwork_test … … 31 31 32 32 === Set the application name in web.xml === 33 The display-name entry in the web app xml configuration file is used extensively th ough geonetwork as the base url for links and resources.33 The display-name entry in the web app xml configuration file is used extensively through !GeoNetwork as the base url for links and resources. 34 34 35 35 * edit web/geonetwork_test/WEB-INF/web.xml … … 64 64 There are a couple of ways to add services to the tomcat server, you can add separate host server.xml files into folders or you can add Context lines to the main server.xml file. This how to assumes the latter. 65 65 66 Add or modify the following code to the file /opt/tomcat/current/conf/server.xml. I'm assuming that both geonetwork services will share the same intermap and geoserver.66 Add or modify the following code to the file /opt/tomcat/current/conf/server.xml. I'm assuming that both !GeoNetwork services will share the same !GeoServer. 67 67 {{{ 68 68 <!-- Define the default virtual host --> 69 69 <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 70 70 <!-- Metadata Catalog - supporting services --> 71 <Context path="/intermap" docBase="/usr/local/geonetwork/geonetwork/web/intermap" crossContext="false" reloadable ="false" />72 71 <Context path="/geoserver" docBase="/usr/local/geonetwork/web/geoserver" crossContext="false" reloadable ="false" /> 73 72