182 z/VM and Linux on IBM System z: The Virtualization Cookbook for Red Hat Enterprise Linux 6.0
11.1 Creating a virtual web server
The example in this section uses the LINUX01 user ID to create a virtual web server. You
should have a virtual server cloned to the LINUX01 user ID, as described in Chapter 9,
“Configuring RHEL 6 for cloning” on page 155.
11.1.1 Installing Apache RPMs
To accomplish this task, perform the following steps:
1. SSH into the IP address of the new LINUX01 server. Install the following Apache RPMs
with the yum -y install command. The -y flag prevents the “Is this OK” question:
# yum -y install httpd httpd-manual
...
Installed:
httpd.s390x 0:2.2.15-5.el6 httpd-manual.noarch 0:2.2.15-5.el6
Dependency Installed:
apr.s390x 0:1.3.9-3.el6 apr-util.s390x 0:1.3.9-3.el6
apr-util-ldap.s390x 0:1.3.9-3.el6 httpd-tools.s390x 0:2.2.15-5.el6
Complete!
2. Verify that the RPMs were installed:
# rpm -qa | grep httpd
httpd-tools-2.2.15-5.el6.s390x
httpd-manual-2.2.15-5.el6.noarch
httpd-2.2.15-5.el6.s390x
Before starting the Apache web server, use the chkconfig command to set the service to
start at boot time:
# chkconfig --list httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig httpd on
# chkconfig --list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
11.1.2 Testing Apache
Start the Apache web server to verify that it installed successfully:
# service httpd start
Starting httpd: [ OK ]
To verify that Apache is installed correctly, after it has started, open a web browser and use it
to access the server. For example, the virtual server running on LINUX01 can be reached by
using the following URL:
http://9.60.18.224/
Commenti su questo manuale