Installation guide
124 Chapter 7:Apache Services
1. On a shared disk, use the interactive fdisk utility to create a partition that will be used for the
Apache document root directory. Note that it is possible to create multiple document root directo-
ries on different disk partitions. See Partitioning Disks in Section 2.4.4 for more information.
2. Use the mkfs command to create an ext2 file system on the partition you created in the previous
step. Specify the drive letter and the partition number. For example:
mkfs /dev/sde3
3. Mount the file system that will contain the Web content on the Apache document root directory.
For example:
mount /dev/sde3 /var/www/html
Do not add this mount information to the /etc/fstab file, because only the cluster software
can mount and unmount file systems used in a service.
4. Copy all the required files to the document root directory.
5. If you have CGI files or other files that must be in different directories or is separate partitions,
repeat these steps, as needed.
Apache must be installed on both cluster systems. Note that the basic Apache server configura-
tion must be the same on both cluster systems in order for the service to fail over correctly. The
following example shows a basic Apache Web server installation, with no third-party modules or
performance tuning. To install Apache with modules, or to tune it for better performance, see the
Apache documentation that is located in the Apache installation directory, or on the Apache Web site,
http://httpd.apache.org/docs-project/.
On both cluster systems, install the Apache RPMs. For example:
rpm -Uvh apache-1.3.20-16.i386.rpm
To configure the cluster systems as Apache servers, customize the httpd.conf Apache configura-
tion file, and create a script that will start and stop the Apache service. Then, copy the files to the other
cluster system. The files must be identical on both cluster systems in order for the Apache service to
fail over correctly.
On one system, perform the following tasks:
1. Edit the /etc/httpd/conf/httpd.conf Apache configuration file and customize the file
according to your configuration. For example:
• Specify the directory that will contain the HTML files. You will specify this mount point when
adding the Apache service to the cluster database. It is only required to change this field if the
mountpoint for the web site’s content differs from the default setting of /var/www/html.
For example:
DocumentRoot "/mnt/apacheservice/html"