Changes between Version 1 and Version 2 of HowToRunMultipleGeonetworkInstancesUnderTomcat


Ignore:
Timestamp:
Nov 7, 2013, 8:58:14 AM (10 years ago)
Author:
ticheler
Comment:

Updated some obvious changes

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 =
    22
    33== What is it you want to do? ==
    4 When GN 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.
     4When !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.
    55
    66== 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.
     71. 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.
    88
    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.
     92. 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.
    1010
    1111== Summary of changes ==
     
    1616
    1717These 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/geonetwork
     18 * !GeoNetwork is installed in /usr/local/geonetwork and is running as http://domain.etc/geonetwork
    1919 * Tomcat is installed in /opt/tomcat
    2020 * You want a second copy to be installed in /usr/local/geonetwork_test and available as http://domain.etc/geonetwork_test
     
    3131
    3232=== Set the application name in web.xml ===
    33 The display-name entry in the web app xml configuration file is used extensively though geonetwork as the base url for links and resources.
     33The display-name entry in the web app xml configuration file is used extensively through !GeoNetwork as the base url for links and resources.
    3434
    3535 * edit web/geonetwork_test/WEB-INF/web.xml
     
    6464There 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.
    6565
    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.
     66Add 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.
    6767{{{
    6868<!-- Define the default virtual host  -->
    6969  <Host name="localhost"  appBase="webapps"  unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    7070    <!-- Metadata Catalog - supporting services -->
    71     <Context path="/intermap" docBase="/usr/local/geonetwork/geonetwork/web/intermap" crossContext="false"  reloadable ="false" />
    7271    <Context path="/geoserver" docBase="/usr/local/geonetwork/web/geoserver" crossContext="false"  reloadable ="false" />
    7372