HP Serviceguard Enterprise Cluster Master Toolkit User Guide, June 2014

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 enables web browsers to directly connect
to the tomcat servlet or through a web server, such as Apache. To integrate Tomcat with Apache,
use the JK Connector. Configure the mod_jk component in Apache to make Apache compatible
with Tomcat. When you choose this configuration, both the Apache and Tomcat toolkit needs to
be configured in a single package and deployed in a highly available Serviceguard environment.
Consider 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. Steps to configure Apache web server with
Tomcat in a single package:
1. mkdir -p /etc/cmcluster/pkg/http_pkg1 /etc/cmcluster.
2. Copy the Apache and Tomcat toolkit files into the package directories.
3. Edit the user configuration files of both Apache and Tomcat and configure in a high available
environment. See “Using an Apache Toolkit in a HP Serviceguard Cluster” (page 98) and
“Using Tomcat Toolkit in a HP Serviceguard Cluster” (page 110)
4. Run the
cd /etc/cmcluster/pkg/tomcat_pkg1
command.
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".
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:-
Configuring Apache Web Server with Tomcat in a Single Package 121