-
Notifications
You must be signed in to change notification settings - Fork 149
Two geoportals on the same server
Christine White edited this page Sep 10, 2013
·
3 revisions
You may want to host two geoportals on the same server for a variety of reasons. One common reason is that you are evaluating a newer version of the Geoportal Server, but want to keep your existing instance running in the meantime.
It is possible to have two geoportals running on the same server. There are several scenarios for how you'd set this up, but these instructions assume the following:
- the geoportal instances are running on the same servlet software (e.g., both running on the same Tomcat)
- the instances are connecting to the same database (note, this is not a requirement - it is actually cleaner for them to each have their own database)
- the instances are connecting to the same user store (e.g., same identity configuration in gpt.xml). Note: do not have two instances connecting to the same database if they use different user stores, as configured in the identity section of the gpt.xml file. This can cause errors if an administrator user in one geoportal attempts to manage records or users found in the other instance's user store.
For this demonstration, the initial geoportal instance is called 'geoportal_first' and the new instance is called 'geoportal_second'. Instructions are for Tomcat, but keep the same concepts in mind when using other supported servlet application software.
- In the newer Geoportal Server distribution, rename the geoportal.war file to something different than what its called for the 'geoportal_first' instance. In this demonstration, it is renamed to geoportal_second.war.
- Deploy the geoportal_second.war file in the \\Tomcat\webapps folder. When the file is deployed, open the gpt.xml file from the \\geoportal_second\WEB-INF\classes\gpt\config directory, and stop the geoportal_second web application in Tomcat (or stop Tomcat, but your geoportal_first application will then also be stopped).
- Configure the gpt.xml file as desired, except for the following important sections:
- the databaseReference element's jndiName attribute is by default "jdbc/gpt". This must be changed if you have two instances running, as this jndiName will connect your geoportal web application to the database. In this example, we set jndiName="jdbc/gpt2".
- the lucene element's indexLocation attribute should be a different location. Even though the two web applications are indexing the same database, setting different indexing locations prevents conflicts in index scheduling. This also means that your second geoportal index won't be populated right away; the web application will need to time to index the database before you will be able to discover all records through the geoportal search interface.
- the parameter key="assertion.index.location" value should be set to a different location, for the same reason as the lucene indexLocation described above.
- the identity section should be configured the same as the geoportal_first's gpt.xml file's identity section.
- Save the gpt.xml file.
- Now you must configure the jndi for this web application. Go to \\Tomcat\conf\Catalina\localhost and make a copy of the context file used by the geoportal_first web application.
- Rename this copy to match the name of your newer geoportal instance, e.g., geoportal_second.xml
- Open the geoportal_second.xml file.
- You can leave all the database settings the same, but you must change the following settings:
- the Context element's docBase and path variables must be updated to the name of the corresponding geoportal web application. E.g., in this example, it looks like:
<Context docBase="geoportal_second" path="/geoportal_second"...
- the Resource element's name attribute must be updated to match the jndiName attribute from the gpt.xml file. In this example, we update it to
<Resource name="jdbc/gpt2"...
- Save the geoportal_second.xml file.
- Restart your geoportal_second web application.
- Give the geoportal_second web application time to index before testing search, but you can test the login and page display in the meantime.
Back to Installation