Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
server
IBM HTTP Server is a great starting point for your Web
infrastructure
04 Nov 2008
Learn how Web servers are used in modern enterprise environments and how to
install and integrate IBM® HTTP Server. This tutorial explains why IBM HTTP Server,
a key component of IBM WebSphere® Application Server, is also an excellent choice
as a stand-alone Web server because of its standard configuration and seamless
upgrade path for evolving enterprise Web environments.
understand several common Web server configuration scenarios and will have a
completely functional Web server.
Objectives
This tutorial provides:
Prerequisites
This tutorial is written for beginning- to intermediate-level systems administrators
who may never have installed or configured a Web server and who may be
unfamiliar with modern Web server architectures. To complete the examples in this
tutorial, you should have a general familiarity with UNIX® command-line shells and
text editors.
System requirements
To run the examples in this tutorial, you need administrative (root) privileges on a
Linux® system on which no Web server is currently installed. At least 450MB of disk
space must be available on the system: A minimum of 200MB must be permanently
available in the file system that contains the /opt/ directory, and 250MB more must
be temporarily available in the file system from which you install IBM HTTP Server.
The system should have a minimum of 512MB of RAM.
revolutionize what users can do from the Internet and the services that businesses
can offer over the Web.
A 2-tier application is well suited to many interactive Web sites and Web
applications, delivering high performance through tight coupling of Web application
code and the data sources that an application accesses. Local database access is
often faster than remote database access, because network latency is not an issue.
On the downside, 2-tier applications can be inefficient when handling a large number
of requests or maintaining state information about large numbers of Web clients.
Using databases and other data sources that are local to the Web server makes
replication and backups difficult and also increases the load on the Web server.
Similarly, the need to store the database or database access information on the
machine on which the Web server is running can introduce security problems if that
system is penetrated and compromised.
The 3-tier architecture can provide several advantages over 2-tier applications:
• Improved performance for high-traffic Web servers, because the data that
Web applications access is stored on other systems. Not running
database (or other data) servers on the same system as the Web or
application server reduces the load on those systems. Similarly,
administrative tasks such as backups of remote databases,
content-management systems (CMS), and other data sources do not
affect the performance of the Web or application server.
• Better server and data resource management through scalability. Web
and application servers can easily be replicated for load balancing
purposes. The 3-tier architecture can increase Web application availability
by implementing automatic failover among multiple Web and application
servers. Connections to remote resources can be managed intelligently.
• Increased security for remote data, because it is always stored on a
system other than the one on which the Web server—and typically the
application server—is running. Penetrating and compromising a Web
server does not directly expose your data.
See the Resources for links to popular 3-tier application servers.
management.
Additional capabilities
IBM HTTP Server version 6.1 is based on Apache Web Server version 2.0.47. In
addition to the core capabilities that Apache version provides, IBM HTTP Server
provides the following features and capabilities:
Supported platforms
This tutorial discusses installing and configuring IBM HTTP Server 6.1. Version 6.1
is available for and supported on the following operating systems and associated
hardware:
• AIX
• HP-UX on IA64 and HP-UX PA-RISC
• Linux (32 bit)
• Linux for IBM System i™, System p™, and System z™
• Sun Solaris and Solaris 10 on x86-64
• Microsoft Windows 2000, Windows Server® 2003, and Microsoft
Windows XP
IBM HTTP Server is officially supported on the 32-bit versions of Red Flag DC 5.0
SP1; Red Hat Enterprise Linux versions 3, 4, and 5; and SuSE Enterprise Server
version 10 Linux distributions, but you should be able to install it cleanly on any Red
Hat Package Manager (RPM)-based Linux distribution. IBM HTTP Server is officially
supported on the 64-bit versions of Red Hat Enterprise Linux versions 3, 4, and 5 as
well as SuSE Enterprise Server version 9 and 10. This tutorial provides tips to
enable you to install and run IBM HTTP Server on other Linux distributions.
Note: You can run the 32-bit Linux versions of IBM HTTP Server on a 64-bit Linux
system as long as you have installed the 32-bit Intel® architecture compatibility
libraries (the ia32-libs package) on that system.
Note: No 64-bit Linux version seems to be available for download. See the section,
"Supported platforms," for information about how to use the 32-bit Linux build on a
64-bit Linux system.
• On UNIX and Linux systems that enable you to assume the identity of the
root user, use the su command to become the root user on the system.
Then, execute the ./install command to begin the installation
process.
• On Linux systems that use the sudo command to execute commands as
the root user, execute the sudo ./install command to begin the
installation process.
• On Windows systems, double-click install.exe to begin the
installation process.
The graphical installer for IBM HTTP Server displays its welcome page, shown in
Figure 1.
The welcome page shows that the graphical installer is working correctly and
provides a link to the IBM HTTP Server Installation Guide located in the file
InstallGuide_en.html. This file resides in the IHS/docs, which was extracted from the
archive file.
Note: If you're installing IBM HTTP Server on a Linux system, the installation guide
won't display correctly from this link unless the Konqueror Web browser is installed
Note: The punctuation around the pwd command must be backwards single
quotation marks, not single quotation marks.
This license contains IBM licensing information and language that excludes open
source components of IBM HTTP Server from those terms. Excluded software in
IBM HTTP Server includes Apache HTTP Server version 2.0.47, Apache Portable
Runtime version 0.9, the zLib compression library version 1.1.4, FAST CGI version
2.4.0, and OpenSSL version 0.9.7c.
Select I accept both the IBM and the non-IBM terms to accept the licensing terms.
Click Next to proceed with the installation process. If you did not accept the license
terms, a window appears asking you to confirm that fact. If you confirm that you do
not accept the license terms, the installer exits.
The next page of the installer either indicates whether your system satisfies the
prerequisites for installation. If your system does not satisfy requirements, the
installer may display information about any missing patches that you should install.
In this case, you can either click Cancel to exit the installer and install the missing
prerequisites or simply proceed with the installation.
Click Next to proceed with the installation process. The page shown in Figure 4
appears. Here, you can specify the ports on which IBM HTTP Server and its
administrative interface listen.
Unless you have a specific reason for specifying other ports, accept the default port
values by clicking Next to proceed with the installation process.
If you're installing IBM HTTP Server on a Windows system, you must specify a
Windows service to start IBM HTTP Server and IBM HTTP Administration, as shown
in Figure 5.
On this page, you can configure that service to start these servers automatically
when you start your system. You can use a local system account or a user account
with sufficient privileges to start the servers.
After supplying this information, click Next to proceed with the installation process.
If you're not planning to use WebSphere Application Server, you can clear the
Create a User ID for IBM HTTP administration server authentication check box.
However, creating this user will not cause any problems on your system and will be
convenient if you subsequently upgrade to WebSphere Application Server.
Note: The IBM HTTP Server administration interface can only be contacted from the
WebSphere Application Server administrative console. It cannot be contacted from a
standard Web browser.
After supplying information about the administrative user, click Next to proceed with
the installation process.
If you're installing IBM HTTP Server on a UNIX or Linux system, you must specify a
user and group allowed to administer IBM HTTP Server. Figure 7 shows this
configuration page.
This page enables you to change the ownership and modes of the files in the IBM
HTTP Server directories to enable administration by that user or members of that
group. You can skip this step by clearing the Setup IBM HTTP administration
server to administer IBM HTTP Server check box.
After identifying a user and group for server administration, click Next to proceed
with the installation process.
Click Finish to exit the installer. Congratulations: You've installed IBM HTTP Server.
The only remaining tasks are to install the IBM GSKit (if you want to support SSL
access to the server) and to start IBM HTTP Server (and, optionally, the IBM HTTP
administration server, if you are also running WebSphere Application Server).
1. Change to the GSKit directory that was created when you extracted the
contents of the IBM HTTP Server archive file.
How you install GSKit depends on the platform on which you have
installed IBM HTTP Server and are now installing GSKit:
3. Install the Alien utility on your non-RPM Linux system to extract the
contents of an RPM package.
You can do this using your Debian or Ubuntu system's aptitude utility:
alien -t -c gsk7bas-7.0-3.20.i386.rpm
as the root user or using the sudo command. This produces the
gsk7bas-7.0.tgz file.
mv usr/local/ibm /usr/local
#!/bin/sh
if [ -n "`rpm --version|grep 4.1`" ]
then export RPM_INSTALL_PREFIX=/usr/local
fi
SRC=$RPM_INSTALL_PREFIX/ibm/gsk7
#!/bin/sh
SRC=/usr/local/ibm/gsk7
3. Save your changes to the script, and exit the text editor.
9. Execute the ./doint.sh. command as the root user, or use the sudo
command.
Note: Before starting IBM HTTP Server on a UNIX or Linux system, you must create
the group under which it will run. This group, identified in the IBM HTTP Server's
configuration file, is nobody, which you can create with whatever software package
you system uses. For example, on a Linux system, you can add the nobody group
by executing the addgroup nobody command as the root user or using the sudo
command.
Starting IBM HTTP Server involves two utilities. You must use the apachectl utility
to start IBM HTTP Server itself, then use the adminctl utility if you're using IBM
HTTP application server to administer IBM HTTP Server.
The apachectl utility is the standard utility used on UNIX and Linux systems for
starting, stopping, and restarting Apache-based Web servers. If you installed IBM
HTTP Server in the default location, this utility resides in /opt/IBM/HTTPServer/bin.
To start IBM HTTP Server using the apachectl utility, execute the command:
/opt/IBM/HTTPServer/bin/apachectl start
After IBM HTTP Server has started, you can use a browser to connect to your
system by its hostname or loopback address to verify that IBM HTTP Server is
running. You should see an initial page similar to Figure 8.
Note: It is only necessary to start IBM HTTP administration server if you are also
using WebSphere Application Server. The IBM HTTP Server administration interface
can only be contacted from the WebSphere Application Server administration
console, not from a standard Web browser.
The adminctl utility is the standard utility used to start, stop, and restart IBM HTTP
administration server. If you installed IBM HTTP Server in the default location, this
utility resides in /opt/IBM/HTTPServer/bin.
To start IBM HTTP administration server using the adminctl utility, execute the
command:
/opt/IBM/HTTPServer/bin/adminctl start
After IBM HTTP administration server has started, you can use the WebSphere
Application Server administration console to connect to your system (using port
8008, by default).
All UNIX and Linux systems use a system mechanism composed of a series of shell
scripts that are executed as the system boots. On most UNIX and Linux systems,
these scripts are organized in the way specified by the SysVInit (that is, System V
Init, which refers to an old version of UNIX) system startup mechanism. In this
mechanism, the primary startup scripts for the system all reside in /etc/init.d, and the
specific scripts that are executed as the system boots into a specific level of
operation (known as a runlevel) are symbolic links from the directories with names of
the form /etc/rcrunlevel.d to the scripts in the /etc/init.d directory. Ubuntu Linux
systems use a different startup mechanism.
Note: The following sections explain how to integrate the apachectl utility into your
To create a SysVInit script for IBM HTTP Server, you can simply copy an existing
script for Apache Web Server and modify it to refer to your IBM HTTP Server
installation. To do so, perform the following steps:
apachectl=/usr/local/apache/bin/apachectl
httpd=/usr/local/apache/bin/httpd
apachectl=/opt/IBM/HTTPServer/bin/apachectl
httpd=/opt/IBM/HTTPServer/bin/httpd
3. Save this file to your system, and copy it to /etc/init.d as the root user or
use the sudo command, giving it a name such as ibm-http.
5. Create symbolic links to this file from /etc/rc5.d by using the following
command:
ln -s /etc/init.d/ibm-http
/etc/rc5.d/S85ibm-http
ln -s /etc/init.d/ibm-http
/etc/rc5.d/K15ibm-http
The next time you shut down your system, the K15ibm-http symbolic link that you
created will automatically stop IBM HTTP Server as part of the shutdown process.
The next time you start your system, the S85ibm-http symbolic link automatically
starts IBM HTTP Server as part of the boot process.
The Ubuntu Linux distribution uses an alternate startup mechanism to the SysVInit
mechanism. The Ubuntu startup mechanism is known as Upstart (see Resources)
and is a relatively new, event-driven startup mechanism that was created for Ubuntu
but is being adopted by other distributions such as Fedora and, therefore, eventually
Red Hat and Centos. Upstart is becoming popular largely because of its support for
concurrency and responsiveness to system events.
1. Save the file to your system, and copy it to /etc/init.d as the root user or
by using the sudo command, giving it a name such as ibm-http.
3. Create symbolic links to this file from /etc/rc5.d directory by using the
following command:
ln -s /etc/init.d/ibm-http
/etc/rc2.d/S91ibm-http
ln -s /etc/init.d/ibm-http
/etc/rc2.d/K15ibm-http
The next time you shut down your system, the K15ibm-http symbolic link that you
created automatically stops IBM HTTP Server as part of the shutdown process. The
next time you start your system, the S91ibm-http symbolic link automatically starts
IBM HTTP Server as part of the boot process.
Section 6. Summary
• The default location for static Web content in IBM HTTP Server is
/opt/IBM/HTTPServer/htdocs.
• The configuration files for IBM HTTP Server reside in
/opt/IBM/HTTPServer/conf. The primary server configuration file for IBM
HTTP Server is httpd.conf. The primary configuration file for IBM HTTP
administration server is admin.conf.
• If you're having trouble getting the server to display your content, consult
the IBM HTTP Server logs for information about any errors that are
occurring. These log files reside in /opt/IBM/HTTPServer/logs. The
access_log file in this directory contains information about every attempt
to access IBM HTTP Server. The error_log file contains information about
any errors that occur during access or content requests from IBM HTTP
Server.
• Because IBM HTTP Server is based on Apache Web Server, you can use
any information about configuring version 2.0 of Apache Web Server to
obtain detailed configuration suggestions and related information.
A Web server is the core of any enterprise Web installation, regardless of the
content you're delivering, the type of data you provide access to over the Web, and
the architectural tier you're using. As a standard Apache-compliant and
well-supported browser that is also a key component of WebSphere Application
Server, IBM HTTP Server provides a great starting point for any Web installation.
Downloads
Description Name Size Download method
Sample Upstart module ibm-http.zip 2KB HTTP
Resources
Learn
• See the 32-bit and 64-bit WebSphere requirements documentation for specific
operating system patch requirements and supported database information.
• See the IBM Redbook, IBM HTTP Server (powered by Apache): An Integrated
Solution for IBM eServer iSeries Servers, for detailed information about
configuring and optimizing IBM HTTP Server.
• See the IBM HTTP Server Information Center for detailed IBM HTTP Server
product documentation.
• See the WebSphere zone on developerWorks for additional information about
planning, developing, and deploying enterprise Web environments and
applications.
• In the UNIX and AIX area on developerWorks, get the resources you need to
advance your skills in UNIX administration.
• Check out additional UNIX tips and tricks from the developerWorks site.
• Browse the technology bookstore for books on WebSphere Application Server,
Apache Web Server, and other technical topics.
Get products and technologies
• Download IBM HTTP Server version 6.1 for your platform.
• Download the Alien utility for converting RPM files to formats that can be used
on Linux systems that do not support RPM.
• Popular 3-tier application servers include WebSphere products, Adobe®
JRun™, Oracle's BEA WebLogic, Red Hat's JBoss, and Sun Microsystems'
Enterprise JavaBean technology.
• Upstart is a relatively new, event-driven startup mechanism created for Ubuntu
and popular largely because of its support for concurrency and responsiveness
to system events.
• Get the complete documentation for Apache Web Server.
• Download a free trial version of WebSphere Application Server for your
platform.
• Download a trial version of the WebSphere Application Server Community
Edition for your platform.
Discuss
• Check out developerWorks blogs and get involved in the developerWorks
community.
• Participate in the AIX for Developers forum.
Trademarks
IBM, AIX, System i, System p, System z, and WebSphere are trademarks of
International Business Machines Corporation in the United States, other countries, or
both.
Adobe and JRun are either registered trademarks or trademarks of Adobe Systems
Incorporated in the United States, and/or other countries.
Intel is a registered trademark of Intel Corporation or its subsidiaries in the United
States and other countries.
Java and JavaServer Pages are trademarks of Sun Microsystems, Inc. in the United
States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other
countries, or both.
Microsoft, Windows, and Windows Server are trademarks of Microsoft Corporation in
the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other
countries.