Sun Cluster 3.0 U1 Data Services Installation and Configuration Guide

Installing and Configuring Apache

This section describes the steps to install the Apache server-either from the Solaris 8 operating-environment CD-ROM or from the Apache Web site-and to enable the server to run as the Sun Cluster HA for Apache data service.

The Sun Cluster HA for Apache data service works with the Apache software configured as either a Web server or a proxy server.

See Apache documentation at http://www.apache.org for standard installation instructions. See the Sun Cluster 3.0 U1 Release Notes for a list of Apache releases supported for use with the Sun Cluster software.

How to Install and Configure the Apache Application Software from the Solaris 8 CD-ROM

The Apache binaries are included in three packages-SUNWapchr, SUNWapchu, and SUNWapchd-which form the SUNWCapache package metacluster. You must install the SUNWapchr package before you install the SUNWapchu package.

Place the Web server binaries on the local file system on each of your cluster nodes or on a cluster file system.

  1. Run the pkginfo(1) command to determine if the Apache packages SUNWapchr, SUNWapchu, and SUNWapchd have been installed.

    If not, install as follows.


    # pkgadd -d Solaris 8 Product directory SUNWapchr SUNWapchu SUNWapchd
    ...
    Installing Apache Web Server (root) as SUNWapchr
    ...
    [ verifying class initd ]
    /etc/rc0.d/K16apache linked pathname
    /etc/rc1.d/K16apache linked pathname
    /etc/rc2.d/K16apache linked pathname
    /etc/rc3.d/S50apache linked pathname
    /etc/rcS.d/K16apache linked pathname
    ...
  2. Disable the START and STOP run control scripts that were just installed as part of the SUNWapchr package.

    This step is necessary because the Sun Cluster HA for Apache data service starts and stops the Apache application after you have configured the data service. Perform the following steps.

    1. List the Apache run control scripts.

    2. Rename the Apache run control scripts.

    3. Verify that all the Apache-related scripts have been renamed.


    Note -

    The following example changes the first letter in the name of the run control script from uppercase to lowercase. However, you can rename the scripts to be consistent with your normal administration practices.



    # ls -1 /etc/rc?.d/*apache
    /etc/rc0.d/K16apache
    /etc/rc1.d/K16apache
    /etc/rc2.d/K16apache
    /etc/rc3.d/S50apache
    /etc/rcS.d/K16apache
     
    # mv /etc/rc0.d/K16apache  /etc/rc0.d/k16apache
    # mv /etc/rc1.d/K16apache  /etc/rc1.d/k16apache
    # mv /etc/rc2.d/K16apache  /etc/rc2.d/k16apachc
    # mv /etc/rc3.d/S50apache  /etc/rc3.d/s50apache
    # mv /etc/rcS.d/K16apache  /etc/rcS.d/k16apache
     
    # ls -1 /etc/rc?.d/*apache
    /etc/rc0.d/k16apache
    /etc/rc1.d/k16apache
    /etc/rc2.d/k16apache
    /etc/rc3.d/s50apache
    /etc/rcS.d/k16apache

How to Install and Configure the Apache Application Software from the Apache Web Site

  1. Become superuser on a cluster member.

  2. Use the steps that the Apache documentation describes to install the Apache software.

    See the documentation that you received with your Apache software or the Apache Web site at http://www.apache.org.

  3. Update the httpd.conf configuration file.

    • Set the ServerName directive.

    • Set the BindAddress directive (optional).

    • Set the ServerType, ServerRoot, DocumentRoot, ScriptAlias, and LockFile directives.

    • Set the Port directive to the same number as the Port_list standard resource property. See Step 4 for more information.

    • Make changes to run as a proxy server if you choose to run the Apache software as a proxy server. See the Apache documentation for more information. If you will run the Apache software as a proxy server, the CacheRoot setting must point to a location on the cluster file system.

  4. Verify that the port number or numbers in the httpd.conf file match those of the Port_list standard resource property.

    You can edit the httpd.conf configuration file to change its port number or numbers to match the standard Sun Cluster resource property default (port 80). Alternatively, while you configure the Sun Cluster HA for Apache data service, you can set the Port_list standard property to match the setting in the httpd.conf file.

  5. (Optional) If you will use the Apache start/stop script Bin_dir/apachectl, update the paths in the script file.

    You must change the paths from the Apache defaults to match your Apache directory structure.

  6. Perform the following tasks to verify your configuration changes.

    1. Run apachectl configtest to check the Apache httpd.conf file for correct syntax.

    2. Ensure that any logical hostnames or shared addresses that Apache uses are configured and online.

    3. Issue apachectl start to start up your Apache server by hand. If Apache does not start up correctly, correct the problem.

    4. After Apache has started, stop it before moving to the next procedure.

Where to Go From Here

If the Apache data-service packages have not been installed from the Sun Cluster Agents CD, go to "Installing Sun Cluster HA for Apache Packages". Otherwise, go to "Registering and Configuring Sun Cluster HA for Apache".