Using HP Serviceguard for Linux to Provide High Availability for LAMP, December 2005

A sample hahttp.conf file and hamysql.conf changes for the above example is shown
below. For a complete description of all variables listed in the hahttp.conf and
hamysql.conf files and their sample values, please refer to the respective toolkit README
files.
hahttp.conf
SERVER_ROOT="/etc/httpd"
PID_FILE="/var/run/httpd.pid"
HTTP_SERVICE_NAME="http.monitor"
HTTP_SERVICE_CMD="/usr/local/cmcluster/conf/http_pkg/hahttp.mon"
HTTP_SERVICE_RESTART="-r 0"
The HTTP_SERVICE_NAME entry must be the same as the SERVICE_NAME used in the
package configuration file.
hamysql.conf
CONFIGURATION_FILE_PATH="/MySQL_1/my.cnf"
PID_FILE="/var/run/mysqld/mysqld.pid"
Now, copy the package directories to all nodes in the cluster running the respective
packages. All the planned nodes should have identical file paths for all package files.
Apply the Serviceguard for Linux package configuration using the “cmapplyconf
command with the “ P” flag.
# cmapplyconf –P lamp_single_pkg.config (After the cluster is configured)
In addition to all the preceding steps edit the Apache (httpd.conf) and MySQL (my.cnf)
configuration files according to your particular setup. Follow the instructions in the toolkit
README’s for editing these files. In the Apache toolkit README these instructions are
listed under the section “Setting up the Apache Web Server”. The MySQL toolkit
README lists these instructions under the section “Setting up MySQL with the Toolkit”.
This is further explained under the section Additional configurations. After this step is
completed and the SELinux Considerations are taken care of, the package would be
ready to run.
Additional configuration steps
In addition to the steps mentioned above there are a few more steps that have to be
completed before the packages can be run. These steps are explained in this section and
apply to either case.
The files Apache configuration file “httpd.confwhich exists in the Apache Server Root
directory and MySQL configuration file “my.cnf” need to be edited in accordance to the
shared configuration of the user’s setup. For the example LAMP configuration described
above httpd.conf and my.cnf can have the following entries. Since the Apache Server
Root directory is local in the example configuration, the file httpd.conf must be replicated
across servers.
httpd.conf
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
9