3 Installing Oracle HTTP Server

You install and configure Oracle HTTP Server on nodes in the web tier.

This chapter contains the following sections:

3.1 Installing Oracle HTTP Server on WEBHOST1 and WEBHOST2

As described in Section 2.3, "Shared Storage and Recommended Directory Structure," Oracle recommends installing Oracle Web Tier onto local disk. You may, however, install the Web Tier onto shared disk, if this is the case:

  • Ensure the software is installed in at least two storage locations for redundancy.

  • The shared storage is different to that which is used for the application tier.

To install Oracle HTTP Server on WEBHOST1 and WEBHOST2:

  1. Check that your machines meet the following requirements:

    • Ensure that the system, patch, kernel, and other requirements are met as specified in the installation guide.

    • Because Oracle HTTP Server is installed by default on port 7777, you must ensure that port 7777 is not used by any service on the nodes. To check if this port is in use, run the following command before installing Oracle HTTP Server. You must free the ports if they are in use.

      netstat -an | grep 7777

  2. On Linux platforms, if the /etc/oraInst.loc file exists, check that its contents are correct. Specifically, check that the inventory directory is correct and that you have write permissions for that directory.

    If the /etc/oraInst.loc file does not exist, you can skip this step.

  3. Start the Oracle Universal Installer from the Oracle Fusion Middleware 11g WebTier and Utilities DVD by issuing this command:


  4. If the Specify Inventory Directory screen appears, enter the location for the inventory and the user group and then click OK; otherwise, ignore steps 4 and 5 and continue with step 6.

  5. Execute the root privileged actions as indicated in the dialog and then click OK.

  6. In the Welcome screen, click Next.

  7. In the Select Installation Type screen, select Install and Configure, and click Next.

  8. In the Prerequisite Checks screen, ensure that all the prerequisites are met, then click Next.

  9. In the Specify Installation Location screen, do the following:

    • On WEBHOST1, set the location to:

      Oracle Middleware Home: MW_HOME

      Oracle Home Directory: Web

    • On WEBHOST2, set the location to:

      Oracle Middleware Home: MW_HOME

      Oracle Home Directory: Web

    Click Next.

  10. In the Configure Components screen, do the following:

    • Select Oracle Http Server.

    • Do not select Oracle Web Cache.

    • Do not select Associate Selected Components with WebLogic Domain because you have not yet installed WebLogic Server.

    Click Next.

  11. In the Specify Component Details screen, do the following:

    • Enter the following values for WEBHOST1:

      • Instance Home Location: ORACLE_BASE/admin/<instance_name>

      • Instance Name: ohs_instance1

      • OHS Component Name: ohs1

    • Enter the following values for WEBHOST2:

      • Instance Home Location: ORACLE_BASE/admin/<instance_name>

      • Instance Name: ohs_instance2

      • OHS Component Name: ohs2

    Click Next.

  12. In the Configure Ports screen, do the following:

    • Select Specify Ports using Configuration File and copy the staticports.ini template file from your installation disk (the file is located in the /Disk1/stage/Response directory) to you user's home. Then use the Browse button to select this file.

    • Click View/Edit File to open the staticports.ini file in an editor.

    • Change the Oracle HTTP Server port in that file to 7777.

    • Save the file.

    Click Next.


    For more information on setting ports, refer to Oracle Fusion Middleware Installation Guide for Oracle SOA Suite.
  13. In the Specify Security Updates screen, enter your e-mail address to receive e-mail notifications of security issues (if required). Enter your Oracle Support Password to receive security updates through My Oracle Support.

  14. In the Installation Summary screen, ensure that the selections are correct, and click Install.

  15. In the Configuration screen, multiple configuration assistants are launched in succession, which can be a lengthy process. When it completes, the Configuration Completed screen appears.

  16. In the Installation Completed screen, click Finish to exit.

3.2 Validating Oracle HTTP Server Through the Load Balancer

Define the directives of the <VirtualHost> section of the httpd.conf file on both OHS servers. This file is located in the ORACLE_BASE/admin/<instance_name>/config/OHS/ohs1 (or ohs2) directory. Add the following entries to the file:

NameVirtualHost *:7777
<VirtualHost *:7777>
    ServerName https://wc.mycompany.com:443
    ServerAdmin you@your.address
    RewriteEngine On
    RewriteOptions inherit

NameVirtualHost *:7777
<VirtualHost *:7777>
    ServerName admin.mycompany.com:80
    ServerAdmin you@your.address
    RewriteEngine On
    RewriteOptions inherit

NameVirtualHost *:7777
<VirtualHost *:7777>
    ServerName wcinternal.mycompany.com:80
    ServerAdmin you@your.address
    RewriteEngine On
    RewriteOptions inherit

Make sure that you restart both OHS servers after modifying the httpd.conf files:

WEBHOST> cd ORACLE_BASE/admin/<instance_name>/bin
WEBHOST> opmnctl stopall
WEBHOST> opmnctl startall

Access the following URLs to ensure that your load balancer and Oracle HTTP Server are configured properly:

  • http://wc.mycompany.com/index.html

  • http://admin.mycompany.com/index.html

  • http://wcinternal.mycompany.com/index.html

  • https://wc.mycompany.com/index.html

3.3 Backing Up Oracle HTTP Server

After you have verified that the Oracle HTTP Server installation is working, back up the installation. This is a quick backup for the express purpose of immediate restore in case of problems in the further steps. The backup destination is the local disk. This backup can be discarded once the enterprise deployment setup is complete. At this point, the regular deployment-specific backup and recovery process can be initiated. The Oracle Fusion Middleware Administrator's Guide provides further details. For information on describing the Oracle HTTP Server data that must be backed up and restored, refer to the "Backup and Recovery Recommendations for Oracle HTTP Server" section in this guide. For information on how to recover components, see "Recovery of Components" and "Recovery After Loss of Component" sections in the guide. For recommendations specific to recovering from the loss of a host, see the "Recovering Oracle HTTP Server to a Different Host" in the guide.

To back up the installation a this point, complete these steps:

  1. Shut down the instance using opmnctl.

    ORACLE_BASE/admin/instance_name/bin/opmnctl stopall
  2. Back up the Middleware Home on the web tier using the following command:

    tar -cvpf BACKUP_LOCATION/web.tar MW_HOME/web
  3. Back up the Instance Home on the web tier using the following command:

    tar -cvpf BACKUP_LOCATION/web_instance_name.tar ORACLE_INSTANCE
  4. Start the instance using opmnctl:

    ORACLE_BASE/admin/instance_namebin/opmnctl startall