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

NOTE: HP recommends that you configure the server root directory and the document root
directory on a shared storage.
In the following example, the volume group /dev/vgtry1 is used as the server root directory
and the document root directory.
a. Mount the logical volume lvol on vgtry1 under the mount point /mnt/vgtry1/
apache. Use an IP address that is not used by any other application. Edit the following
variables in the package control script.
GFS="NO"
DATA_REP="none"
RAIDSTART="raidstart -c ${RAIDTAB}"
RAIDSTOP="raidstop -c ${RAIDTAB}"
VGCHANGE="vgchange -a y"
VG[0]="/dev/vgtry1"
LV[0]="/dev/vgtry1/lvol"; FS[0]="/mnt/vgtry1/apache";
FS_TYPE[0]="ext2"; FS_MOUNT_OPT[0]="-o rw"
FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]=""
FS_UMOUNT_COUNT=1
FS_MOUNT_RETRY_COUNT=0
CONCURRENT_FSCK_OPERATIONS=1
CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS=1
IP[0]="aa.bb.ccc.d"
SUBNET[0]="xx.yy.zzz.a"
SERVICE_NAME[0]="apache1_service"
SERVICE_CMD[0]="${SGCONF}/pkg/apache1/toolkit.sh
monitor"
SERVICE_RESTART[0]=""
b. To start the Apache toolkit package, add the following line to the
customer_defined_run_cmds function of the control script:
function customer_defined_run_cmds
{
${SGCONF}/pkg/apache1/toolkit.sh start
}test_return 51
c. To halt the Apache toolkit package, add the following line to the
customer_defined_halt_cmds function of the control script:
function customer_defined_halt_cmds
{
${SGCONF}/pkg/apache1/toolkit.sh stop
test_return 52
}
NOTE: You must select a package IP address that is not used by any other application.
Serviceguard cannot start a package if the IP address corresponding to the package is
already in use.
4. Edit the Apache toolkit configuration file hahttp.conf.
5. Copy the package directory to all the other package nodes.
For example: Change to the parent directory of the package directory and enter the following
command:
# rcp -r p ${SGCONF}/pkg/apache1 node2:$PWD/
6. To apply the package configuration, run:
# cmapplyconf -P pkg.conf
7. To view the package details, run:
# cmviewcl
Using SG Apache toolkit 13