7.2 Converting the Apache Cluster Resource

  1. In iManager, offline the NSS pool cluster resource from a NetWare node, then modify its load and unload scripts to remove the Apache start and stop commands.

  2. In iManager, online the cluster resource on a NetWare node to activate the changes you made to the scripts.

  3. In iManager, cluster migrate the cluster resource to a Linux node, then offline the resource.

  4. Complete the cluster conversion.

  5. For each Linux node in the cluster, install the Web and LAMP Server option under the Linux Primary Functions category.

    The Web and LAMP Server pattern includes the Apache and MySQL packages, and scripting languages such as PHP, Python, Ruby on Rails, and Perl.

    1. Log in as the root user, then open YaST.

    2. In YaST, select Open Enterprise Server > OES Install and Configuration.

    3. On the Software Selection page, under Primary Functions, select Web and LAMP Server, then click Accept.

    4. Continue with the installation.

  6. (Optional) Install Tomcat.

    1. Log in as the root user, then open YaST.

    2. In YaST, click Software in the left pane, then click Software Management in the right pane.

    3. In the Search field, type tomcat, then click Search.

    4. Select the Tomcat packages you want to install, then click Accept.

      If you encounter a dependency conflict, select the package you want to install to resolve the conflict, then click OK -- Try Again to continue with the installation.

  7. After the Web services are installed on all nodes, log in as the root user on the master node, then configure the Apache Web Server.

    1. Log in as the root user, then open YaST.

      In YaST, click Network Services in the left pane, then click HTTP Server in the right pane.

      Apache is referred to as the HTTP Server on Linux.

    2. Configure the following HTTP Server settings by using the HTTP Server Wizard:

      For wizard instructions, see Section 40.2.2, Configuring Apache with YaST in the SLES 10 SP4 Installation and Administration Guide.

      • Port (and open the firewall)

      • Network devices

      • Modules for scripting (PHPS, Perl, Python, Ruby)

      • Default host

      • Virtual host

      The default host settings on Linux are:

      Parameter

      Default Value

      Port

      80

      Document Root

      /srv/www/htdocs

      Point the service to the virtual IP address of the NSS pool cluster resource that contains the Web content.

      Alias

      /icons points to /usr/share/apache2/icons

      ScriptAlias

      /cgi-bin points to /srv/www/cgi-bin

      Include

      /etc/apache2/conf.d

      /etc/apache2/conf.d/apache2-manual.conf

      Server Name

      /http://<fully_qualified_distinguished_name_or_ip_address>

      Server Administrator Email

      <specify an email address>

    3. To verify that Apache has started successfully, open a Web browser and view the following URL:

      http://Web_server_address:port_number

      where Web_server_address is the IP address or hostname of your Linux server and port_number is the Apache listen port, which is 80 by default. For example:

      http://192.168.1.18:80

      http://localhost:80

      If Apache is correctly set up, you should see a Web page that starts with the following message:

      If you can see this, it means that the installation of the Apache Web Server software on this system was successful. You may now add content to this directory and replace this page.
      
    4. Replace the Apache test page (/apache2/htdocs/index.html) with your own home page.

  8. Copy the Apache configuration file (/etc/apache2/httpd.conf) to every Linux node in the cluster.

  9. (Optional) Set up an SSL certificate for the Apache server.

    For information, see Section 40.6, Setting Up a Secure Web Server with SSL in the SLES 10 SP4 Installation and Administration Guide.

  10. In iManager, set up the preferred nodes for the Apache cluster resource.

  11. In iManager, modify the load and unload scripts for the cluster resource to add the Apache service start and stop commands for Linux.

    /usr/sbin/rcapache2 start
    
    /usr/sbin/rcapache2 stop
    
  12. Online the Apache cluster resource.