HP Serviceguard Linux Contributed Toolkit Suite A.04.02.01 User Guide (696979-001, June 2012)

ExampleVariable
/mnt/vgtry2/apacheFS
aa.bb.ccc.dIP
xx.yy.zzz.aSUBNET
apache2_serviceservice_name
${SGCONF}/pkg/apache2/toolkit.sh monitorservice_cmd
function customer_defined_run_cmds
{
${SGCONF}/pkg/apache2/toolkit.sh start
test_return 51
}
function customer_defined_halt_cmds
{
${SGCONF}/pkg/apache2/toolkit.sh stop
test_return 52
}
5. To edit the Apache toolkit configuration file hahttp.conf, run:
HTTPD_CONFIG_FILE="/mnt/vgtry2/apache/httpd.conf"
6. To configure the PID_FILE parameter with the path for pid file for the corresponding instance,
run:
PID_FILE="${SGCONF}/pkg/apache2/httpd_s1.pid"
7. To edit the listen parameter in the httpd.conf file such that the specified port is not being
listened to by any other application, run:
Listen <port_number>.
8. Edit the corresponding httpd.conf file, and the other Apache configuration files placed in
the server root directory.
9. Copy the package directory to the other nodes in the cluster.
For example, change to the parent directory of the package directory and enter the following
command:
# rcp -r p /usr/local/pkg/cmcluster/apache2 node2:$PWD/
10. To apply the package configuration, run:
# cmapplyconf -P pkg.conf
11. To view the package details, run:
# cmviewcl
12. To enable the AUTORUN parameter, run:
# cmmodpkg e <package_name>
13. To enable package switching, run:
# cmmodpkg e -n node-1, -n node-2 ... -n node-n <package_name>
Configuring modular Apache toolkit packages
To configure modular Apache toolkit packages:
1. Create a directory for the package on all the cluster nodes using the following command:
# mkdir ${SGCONF}/pkg/Apache
2. cd to the package directory.
Using SG Apache toolkit 15