Installing and configuring IBM HTTP Server on the z/OS V2R2 system

We can use the install_ihs installer program to configure an instance of IBM HTTP Server on the z/OSĀ® operating system. Before you begin using IBM HTTP Server, you must create an instance of the server with the /usr/lpp/ihsa_zos/bin/install_ihs script as detailed in the following procedure.


Before you begin

Attention: IBM HTTP Server Version 9 now installs with the base operating system on z/OS V2R2 and later. No separate installation is required, but separate installation using IBM Installation Manager is still possible. For details on a separate installation, refer to Install IBM HTTP Server for WebSphere Application Server for z/OS V2R1 and earlier. Before you use the installer program, complete the following items:

  • Create a System Authorization Facility (SAF) user ID and group for IBM HTTP Server. For more information, see Perform required z/OS system configuration.

    The following examples assume a server user ID of WWWSERV and a server group of WWWGROUP.

  • Choose a directory to hold the configuration files for the server instance. This directory is sometimes referred to as the installation directory for the server instance. Because the directory contains both the configuration and the run-time logs for the server instance, you might want to create a separate filesystem for it.The examples that follow assume an installation directory of /etc/websrv1. Set the directory permissions to 770, and the directory ownership to the server user ID and group:
    mkdir  /etc/websrv1 
    /usr/sbin/mount -f OMVS.SYS1.WEBSRV1.ZFS /etc/websrv1
    chown  WWWSERV:WWWGROUP /etc/websrv1
    chmod 770 /etc/websrv1
    


About this task

The following steps use the install_ihs installer program to install a running instance of IBM HTTP Server for z/OS on your z/OS operating system.


Procedure

  1. Log in to the z/OS UNIX System Services shell with the user ID that runs the installer. Use either the server user ID discussed in the Before you begin section, or another user ID in the server group that you use for administration. Change the directory to the IBM HTTP Server product code directory:
    cd /usr/lpp/ihsa_zos

  2. Set the umask value to 022 by specifying umask 022.

    To verify that the umask value is set to 022, run the umask command with no parameters.

  3. Run the bin/install_ihs program to install the product files into the installation directory, perform initial customization, and create symbolic links from the installation directory to the product directory.
    install_ihs installDir serverPort

    • The installDir variable is the absolute path to the installation directory, which holds the server instance configuration.

    • The serverPort variable is the non-SSL port for the web server. If you omit the serverPort variable, the default is port 80.

    The following example creates a configuration in the /etc/websrv1 directory for a web server that listens on port 8080:

    install_ihs /etc/webserv1 8080

    We can add several more options to perform initial customization and setup of the server instance:

    • Add the -31 parameter to have the installer create a 31-bit instance of IBM HTTP Server. This parameter must be used only if IBM HTTP Server is being used in combination with a product other than WebSphere Application Server. Products that require IBM HTTP Server to run in 31-bit mode document the requirement of passing this flag.
      install_ihs -31 /etc/websrv1 8080

    • Add the -admin parameter to allow the WebSphere Application Server administration console to modify the httpd.conf file. (A WebSphere Application Server for z/OS node must be running on the same system as the IBM HTTP Server instance.)
      install_ihs -admin /etc/websrv1 8080

      You must also add the WebSphere Application Server control region user ID to the IBM HTTP Server group by using SAF. For example, to add a user ASCR1 to the group WWWGROUP, enter the following TSO command:

      CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)

    • If for any reason the IBM HTTP Server group is not the default group for the user ID that is used to run the install_ihs installer program, we can name the IBM HTTP Server group explicitly with the -group parameter:
      install_ihs -admin -group IMGROUP /etc/websrv1 8080

    • Start with Fix Pack 9.0.0.9, the IBM HTTP Server product code also contains the WebSphere Application Server plug-ins for IBM HTTP Server in the /usr/lpp/ihsa_zos/plugin directory. Beginning with this fix pack, we can add more parameters to the installer command to configure the plug-in when you create the server instance:
      install_ihs -plugin
                  -wasInstallLocation wasProductDir
                  -wasServerName serverName
                  -wasHostName serverHost
                   installDir serverPort
      

      The -plugin parameter indicates that the WebSphere Application Server plug-in is to be configured.

      The -wasInstallLocation parameter points to the WebSphere Application Server for z/OS product code. If it is not specified, a value of /usr/lpp/WebSphere/V9R0 is used.

      The -wasServerName parameter is required if the -plugin parameter is specified. This parameter provides the name by which the web server is known in the WebSphere Application Server configuration.

      The -wasHostName parameter is required if the -plugin parameter is specified, and provides the host name for the web server instance.

      By default, the plug-in configuration is placed in the installDir/plugin/config/serverName/plugin-cfg.xml file, and the installDir/config/httpd.conf server configuration file is updated to refer to the WebSphere Application Server product. We can use more options on the installer command to change these values. For more information, enter the install_ihs -help command.

      The following example starts the installer program to create a web server instance and configure the WebSphere Application Server plug-in.
      install_ihs -plugin
                  -wasInstallLocation /products/WAS90
                  -wasServerName webserver1
                  -wasHostName host2.mycorp.com
                   /etc/websrv1 8080

  4. Optional: Create multiple instances of IBM HTTP Server by running the IBM HTTP Server installer program more than once.

    Specify a different installation directory and, in most cases, a different port each time that you run the installer program.


Results

Perform the following steps to confirm that you successfully installed a running version of the product on your z/OS operating system:

  1. Log in to the OMVS shell by using the server user ID.

  2. Change the directory to the installation directory of the server instance:
    cd /etc/websrv1

  3. Run the apachectl -v and apachectl configtest commands to verify the installation of the program.The following sample output is an example of a successful program installation:
    # bin/apachectl -v
    Server version: IBM_HTTP_Server/9.0.0.0 (Unix)
    Server built:   Jan  27 2016 12:38:02
    # bin/apachectl configtest
    Syntax OK

    The actual version string and build date varies.

  4. Start IBM HTTP Server.
    bin/apachectl start

  5. Point a web browser to the IP name or address of your z/OS system by using either the non-SSL port number you specified when you ran the installer program, or the default port of 80.

    If the installation is successful, the IBM HTTP Server default home page displays.

  6. Stop IBM HTTP Server by running the following command:
    bin/apachectl stop


What to do next

  • If you are using IBM HTTP Server with WebSphere Application Server and did not configure the plug-in when you ran the install_ihs installer program, install and configure the WebSphere Application Server plug-in for IBM HTTP Server according to the instructions in the WebSphere Application Server for z/OS IBM Knowledge Center. If IBM HTTP Server is at Fix Pack 9.0.0.9 or later, we can use the WebSphere Application Server plug-in in the /usr/lpp/ihsa_zos/plugin directory instead of installing them separately with IBM Installation Manager.

  • Create a JCL cataloged procedure to start the server instance. You must do this step if you are using the administrative console to start and stop IBM HTTP Server. For more information, see Use JCL procedures to start IBM HTTP Server on z/OS.Important: The PARM value in a JCL cataloged procedure that is limited to 100 characters. Since the PARM value contains the installation directory (&DIR), the total length might exceed the 100 character limit. Take the path name length into consideration when you choose the installation directory. If the installation directory path name is too long, it is possible to use a shorter named path in the JCL that is symbolically linked to the original installation directory path name.

  • Edit the IBM HTTP Server configuration file, httpd.conf, to meet your organization's needs. For more information about this file and about supported Apache modules, see Configure IBM HTTP Server.The following changes are typical ones that we can make to the configuration file:

    • Edit the DocumentRoot directive to point to the web pages for your site.

    • Enable SSL support by adding the following directives to the end of the httpd.conf file:
      LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
      Listen 443
      <VirtualHost *:443>
      SSLEnable
      </VirtualHost>
      SSLDisable
      Keyfile /saf saf-keyring-name

      The Keyfile directive can instead specify an HFS file name by using the syntax of Keyfile /path/to/keyfile.kdb. The .sth file must be in the same directory as the .kdb file. For more information, see Secure with SSL communications and Secure Sockets Layer (SSL) directives.

    • Verify that mod_status module is enabled as shown in the following example:
      LoadModule status_module modules/mod_status.so
      <IfModule mod_status.c>
      ExtendedStatus On
      </IfModule>
      ...
      <IfModule mod_status.c>
      <Location /server-status>
          SetHandler server-status
          Require all denied
      #   To allow access from a specific IP:
      #   Require ip 192.168.1
      </Location>
      </IfModule>

      If you want to restrict access to a specific IP address, uncomment the sample mod_access Require directive, but modify the IP argument to specify the proper IP address.

    • We can install the web server to an HFS shared R/W by multiple hosts in a sysplex.Special configuration requirements exist for components of the web server that use AF_UNIX sockets. AF_UNIX sockets are not supported by an HFS that is shared R/W. So, configuration directives are used to place the AF_UNIX sockets on a filesystem that is owned by the host on which the web server runs.

      • If mod_ibm_ssl is loaded, use the SSLCachePortFilename directive to specify a file on a filesystem owned by the local host.

      • If mod_fastcgi is loaded, use the FastCGIIpcDir directive to specify a directory on a filesystem owned by the local host.

  • If you are using IBM HTTP Server with WebSphere Application Server and you specify -admin when you created the server instance, we can add support for the administrative console after the initial installation.

    • Run the bin/enable_admin script to set the permissions needed to modify the httpd.conf file from the administrative console.

    • Add the control region user ID to the IBM HTTP Server group by using SAF. See the following example:
      CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)

    • Create a cataloged JCL procedure to start and stop the server. For more information, see Use JCL procedures to start IBM HTTP Server on z/OS.


Related concepts


Related tasks


Related