HP Enterprise Cluster Master Toolkit User Guide (5900-2131, December 2011)

Configuring Apache web server with Tomcat in a single package
NOTE: This section contains details on configuring Apache web server with Tomcat in a single
package only for the legacy method of packaging. For configuring Apache and Tomcat in a single
package using the modular method of packaging, see whitepaper Modular package support in
Serviceguard for Linux and ECM Toolkits available at http://www.hp.com/go/
hpux-serviceguard-docs —>HP Serviceguard Enterprise Cluster Master Toolkit.
Tomcat can be setup in a stand alone configuration that allows web browsers to be connected
directly to the tomcat servlet or through web server such as Apache. To integrate Tomcat with
Apache, the JK Connector is used. The mod_jk component needs to be configured in Apache in
order to make Apache work with Tomcat. When the user chooses this type of configuration and
it needs to be deployed in a highly available Serviceguard environment then both the Apache and
Tomcat toolkit need to be configured in a single package. The example below gives the steps for
configuring such a package. This example assumes that both Apache and Tomcat server are
configured on a single Volume group vg01 (in case of LVM) and a single mount point /share/pkg_1.
1. mkdir -p /etc/cmcluster/pkg/http_pkg1 /etc/cmcluster.
2. Copy the Apache and Tomcat toolkits files into the respective directories.
3. Edit the user configuration files of both Apache and Tomcat and make suitable changes. See
“Using an Apache Toolkit in a HP Serviceguard Cluster” (page 97) and “Using Tomcat Toolkit
in a HP Serviceguard Cluster” (page 110)
4. cd /etc/cmcluster/pkg/tomcat_pkg1
5. Create the Serviceguard Package configuration and Package control scripts
cmmakepkg -p pkg1.ascii (Serviceguard Package configuration script)
cmmakepkg -s pkg1.cntl (Serviceguard Package control script).
6. Edit the Package Configuration script "pkg1.ascii" and configure it. Also configure two services
"http_pkg1.monitor" and "tomcat_pkg1.monitor" as shown below:
SERVICE_NAME tomcat_pkg1.monitor
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
SERVICE_NAME http_pkg1.monitor
SERVICE_FAIL_FAST_ENABLED NO
SERVICE_HALT_TIMEOUT 300
7. Edit the Package Control script "pkg1.cntl" and configure the two toolkits as show below:-
122 Using Tomcat Toolkit in a HP Serviceguard Cluster