Submit a ticketCall us

Get a crash course on Network Monitoring delivered right to your inbox
This free 7-day email course provides a primer to the philosophy, theory, and fundamental concepts involved in IT monitoring. Lessons will explain not only how to perform various monitoring tasks, but why and when you should use them. Sign up now.

Home > Success Center > Web Help Desk (WHD) > Web Help Desk Administrator Guide > Appendix > Configure multiple instance Tomcat deployments

Configure multiple instance Tomcat deployments

Created by Steve.Hawkins, last modified by Anthony.Rinaldi_ret on Jul 18, 2016

Views: 17 Votes: 0 Revisions: 4

Apache Tomcat is an open source software product that creates both a Web and application server for your enterprise. The software provides a Web container that enables Java servlets and Run pages, which support Java code running along with a Web server. You can run multiple-instance Tomcat deployments on Linux installations.

Before you install Tomcat, perform the following procedures on your Linux server:

chmod 744 template_tomcat_home_directory/bin/*.sh

This command does not apply for Apache Tomcat Core 8.

  1. Download Apache Tomcat 7.0.68 from the Apache Tomcat Core 7 website.
  2. Unzip the files to a directory you create on your Tomcat server running Linux.

    For example: /cluster/apache-tomcat-7.0.68

    This location will be referred to as template_tomcat_home_directory in this procedure.

  3. In your <template_tomcat_home_directory>/bin directory, add the execution privilege to all scripts using the following command:
  4. Download the Apache httpd server version for your operating system from the Apache HTTP Server Project site.

    See Compiling and Installing at the Apache HTTP Server Project Website for information about installing HTTP Server.

  5. Install Apache httpd server using yum search/install commands.
  6. Install the latest version of SolarWinds Web Help Desk for Linux from the rpm package. See the Web Help Desk Admin Guide for installation instructions.

    The default installation directory is:

    /user/local/webhelpdesk

    This location will be known as <whd_home> in this procedure.

  7. Start Web Help Desk.
  8. Connect to the appropriate database.
  9. Ensure that Web Help Desk is operating efficiently.
  10. Stop Web Help Desk.

Install multiple tomcat instances

You can create multiple Tomcat instances that point to the <tomcat_home>/webapps directory. These Tomcat instances run as separate processes with their own long files, port numbers, and resources.

  1. Copy the template_tomcat_home_directory instance to /cluster as a Tomcat1 directory.

    This directory will be referred to as TOMCAT_1_HOME in this procedure.

  2. Add execute privileges to all scripts in the TOMCAT_1_HOME directory.

    Execute:

    chmod 744 tomcat_1_home/bin/*sh

  3. Remove the <TOMCAT_1_HOME>webapps directory.

    Execute:

    rm -rf TOMCAT_1_HOME/webapps directory.

  4. Create a webapps soft link in the <TOMCAT_1_HOME> directory pointing to <template_tomcat_home_directory>/webapps.

    Execute:

    In -s template_tomcate_home_directory/webapps/ webapps

  5. Update the TOMCAT_1_HOME/conf/server.xml file to avoid port conflicts.

    Update the default values listed below:

    <Server port="8005" shutdown="SHUTDOWN">

    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/>

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="worker1">

    to the following values:

    <Server port="8100" shutdown="SHUTDOWN">

    <Connector port="8200" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />

    <Connector port="8300" protocol="AJP/1.3" redirectPort="8443"/>

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="worker2">

    If these ports are reserved, use another set of ports. SolarWinds recommends having a consistent port numbering convention to avoid conflicts.

  6. Update the TOMCAT_1_HOME logback-config.xml file so it points to a correct log directory.

    Execute:

    <File>TOMCAT_1_HOME/logs/whd-spring.log</File>

    <fileNamePattern>TOMCAT_1_HOME/logs/whd-spring.%d{yyyy-MM-dd}.log</fileNamePattern>

  7. Update the catalina.sh script in the TOMCAT_1_HOME/bin directory to accommodate TOMCAT_1_HOME port changes in the server.xml file and modify activemq.broker.port to avoid conflicts.

    Update the script as follows:

    -Djava.endorsed.dirs=TOMCAT_1_HOME/webapps/endorsed

    -DWHDconfig=TOMCAT_1_HOME/webapps/.whd.properties

    -Dlogback.configurationFile=TOMCAT_1_HOME/logback-config.xml

    -DWHDPort=8200

    -DWHDPrivateBaseUrl=http://localhost:8200

    -Dactivemq.broker.port=61618

  8. Edit the Apache httpd.conf file, adding a new worker.

    Update the default values listed below:

    <Proxy balancer://cluster>

    BalancerMember http://localhost:8080 loadfactor=1 route=worker1

    ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid|wosid

    </Proxy>

    to the following values:

    <Proxy balancer://cluster>

    BalancerMember http://localhost:8080 loadfactor=1 route=worker1

    BalancerMember http://localhost:8200 loadfactor=1 route=worker2

    ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid|wosid

    </Proxy>

  9. Restart the Apache httpd service and both Tomcat instances.
  10. Start Web Help Desk.
 
Last modified
15:16, 18 Jul 2016

Tags

Classifications

Public