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
-
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
-
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.
-
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
- 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.
Perform the following steps to confirm that you successfully installed a running version of the
product on your z/OS operating system:
The
actual version string and build date varies.
If the installation is successful, the IBM HTTP Server default home page displays.
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.
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.
Results
cd /etc/websrv1
# 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
bin/apachectl start
bin/apachectl stop
What to do next
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
Listen 443
<VirtualHost *:443>
SSLEnable
</VirtualHost>
SSLDisable
Keyfile /saf saf-keyring-name
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>
CONNECT ASCR1 GROUP (WWWGROUP) OWNER (WWWGROUP)
Related concepts
Related tasks
Related