3SE-SPI Applications of the Tool Group.........................................................................................50
4SE SPI Applications of the Policy Group.......................................................................................50
7
8
Introduction
Executive Summary
The HP Open Source Integrated Portfolio (HP OSIP) comprises a range of products and services
designed to verify that customers can successfully realize the cost and feature benefits of adopting
open source software in their IT environments. HP Open Source foundation components include
the base components of an open source-based ecosystem. HP servers and storage are validated
to run the Linux operating system together with the supported commercial Linux distribution.
HP Open Source Middleware Stacks offer building block applications, such as the Web Server;
technical blueprints, such as this document, describing how to integrate individual components
of a technology stack; and consulting services to speed the successful implementation of an open
source strategy.
Intended Audience
The intended audience for this document is enterprise customers who are evaluating or deploying
an open source Web Server on HP ProLiant servers running SUSE Linux Enterprise Server Version
10 (SLES10).
Scope and Purpose
This blueprint provides technical information for the implementation of an open source Web
Server Middleware Stack. It covers installation of the initial Linux distribution and middleware
building blocks, integration of the components, and steps for verification of stack functionality.
The software components described in this paper are tested and validated to run on HP ProLiant
servers and StorageWorks products.
HP provides quality assurance from extensive integration testing with open source software and
HP hardware so that you can confidently deploy the complete stack. Once you have completed
a successful evaluation, you have the flexibility to “do it yourself” or get assistance from HP to
incorporate open source stacks into your existing IT infrastructure.
HP Services
HP Open Source Consulting Services can help you build and integrate open source and commercial
software across multiple operating systems (OS) environments. Additionally, HP Open Source
Support Services provide industry leading technical support for all the products HP sells,
including hardware, operating systems, and open source middleware.
NOTE:While HP does not offer support for JDK, JVM, and components directly, a number of
commercial support options are available for these components. HP can help you integrate those
offerings into one support strategy.
To learn more about HP Open Source Consulting and Support Services, contact your local HP
sales representative or visit the HP Business and IT Services website at:
http://www.hp.com/hps
Introduction9
Typographic Conventions
This document uses the following typographical conventions.
Command
ComputerOut
Ctrl-xA key sequence. A sequence such as Ctrl-x indicates that
ENVIRONVARThe name of an environment variable, for example, PATH.
[ERRORNAME]
KeyThe name of a keyboard key. Return and Enter both refer
TermThe defined use of an important word or phrase.
UserInput
VARIABLE
\ (continuation character)
...The preceding element can be repeated an arbitrary number
|Separates items in a list of choices.
A command name or qualified command phrase.
Text displayed by the computer.
you must hold down the key labeled Ctrl while you press
another key or button.
The name of an error, usually returned in the errno
variable.
to the same key.
Commands and other text that you type.
The name of a placeholder in a command, function, or
other syntax display that you replace with an actual value.
A backslash (\) at the end of a line of code (such as a
command) indicates that the following line of code is
contiguous, and you must not insert a line break. This
convention facilitates the typesetting of long lines of code
examples on a printed page. If you cut and paste sample
code from this publication, ensure that you remove
backslash characters at line endings.
of times.
HP Encourages Your Comments
HP encourages your comments concerning this document. We are committed to providing
documentation that meets your needs. Send any errors found, suggestions for improvement, or
compliments to:
feedback@fc.hp.com
Include the document title, manufacturing part number, and any comment, error found, or
suggestion for improvement you have concerning this document.
10
HP Open Source Web Server Middleware Stack
The following components comprise the HP OSMS Web Server Middleware Stack:
Apache Web ServerThe Apache Web Server is a mature open source web server that has
become the de facto standard because of its high adoption rate on
the Internet.
Apache Tomcat
HibernateHibernate is an object/relational persistence and query service for
mod_jk
mod_ssl
PerlPerl (Practical Extraction and Report Language) has long been a
PHPPHP is a scripting language that can be embedded in HTML pages,
PythonPython is an object-oriented language that has a clean, straightforward
JDKThe Java Platform Standard Edition Development Kit (JDK) is a
Apache Tomcat (or Tomcat) is a J2EE servlet and Java™ Server Pages
(JSP) engine for developing and deploying web applications. It also
includes other features, such as an embedded web server.
Java. Hibernate provides support for collections and object relations,
and composite types. In addition to persisting objects, Hibernate
provides a rich query language to retrieve objects from the database,
and an efficient caching layer and Java Management Extensions (JMX)
support. User-defined data types and composite primary keys give
additional flexibility to support legacy applications.
The mod_jk module is commonly used to allow Tomcat to handle
Java Servlet and JSP requests while Apache httpd handles requests
for static and dynamic contents implemented in PHP, Perl, or Python.
The mod_ssl module provides a Secure Sockets Layer (SSL) and
Transport Layer Security (TLS) implementation that allows web
applications running within the Apache Web Server to communicate
securely with their respective clients. Communication can still occur
over standard HTTP while running mod_ssl.
popular text-processing language. Recently, Perl has become popular
for the development and deployment of web applications.
allowing developers to add more dynamic contents to their web
applications. A large portion of the PHP syntax is similar to C and
Java.
syntax. Python can be extended to exploit facilities implemented in
other programming languages, such as C and C++.
development platform for building Java-based applications and
components.
Web Server Stack Architecture
This section provides architecture, configuration, and the software environment for a web server
stack. Figure 1 shows the logical architecture of the stack.
HP Open Source Web Server Middleware Stack11
Figure 1 Web Server Stack Architecture
Table 1 lists the software used to test the configurations described in this blueprint.
Table 1 Software Test Configuration
Software
Tomcat
Version
2.2.0-21.2Apache httpd
5.5.20Apache
3.2.1Hibernate
2.2.0-21.2mod_ssl
1.2.20mod_jk
5.8.8-14.2Perl
5.1.2-29.5PHP
2.4.2-18.2Python
1.5.0_10Sun JDK
apache2.2.0-21.2.x86_64.rpm
apache-tomcat-5.5.20.tar.gz
hibernate-3.2.1.tar.gz
apache2-prefork-2.2.0-21.2.x86_64.rpm
tomcat-connectors-1.2.20-src.tar.gz
perl-5.8.8-14.2.x86_64.rpm
php-5.1.2-29.5.x86_64.rpm
python-2.4.2-18.2.x86_64.rpm
jdk-1_5_0_10-linux-amd64-rpm.bin
Novell
Apache
Website LinkDistributorPackage NamePackage
Apache httpd
website
Apache Tomcat
website
Hibernate websiteHibernate
mod_ssl websiteNovellInclude with
mod_jk websiteApache
Perl websiteNovell
PHP websiteNovell
Python websiteNovell
Sun Java websiteSun
12
NOTE:The installation and configuration of the MySQL and Oracle databases are not covered
in this blueprint. The MySQL and Oracle databases are installed on a separate HP ProLiant
servers with database files on Modular Smart Array (MSA) 1000 storage. All other software listed
in Table 1 are installed on HP ProLiant servers, as displayed in Figure 2.
Figure 2 Web Server Hardware Environment
Figure 2 shows a basic configuration consisting of multiple nodes of an Apache Web Server as
the load balancer. The key processes that occur are as follows:
•Connection of the Apache Web Server and the Tomcat Web Container, using the mod_jk
module.
•Connection of Apache Tomcat Server to a database, such as MySQL or Oracle, using a JDBC
Driver.
•Support from Apache Web Server for login authentication using Java Authentication and
Authorization Service (JAAS) with the Symas Connexitor Directory Services (CDS) Server.
•Use of an additional, required OpenView Management Server to host HP OpenView
Operations (OVO) for manageability through the Apache Web Server.
For a checklist that provides high-level guidelines for building the web server stack, see “Appendix
A: Checklist for Building a Web Server Middleware Stack” (page 51).
Installing and Verifying the Linux Distribution
This section describes how to build a Web Server Middleware Stack, beginning with the
installation of the Linux distribution.
Installing the Linux Distribution
Complete instructions for installation of a Linux distribution are outside the scope of this
document. This section provides information to verify installation of the required packages for
the OSMS Web Server.
Required Packages and Installation Recommendations
The Web Server Middleware Stack depends on several software package groups included with
the SLES10 distribution media. To verify package selection, perform the following steps:
1.From the Installation Settings screen of YaST, select the Software tab.
Installing and Verifying the Linux Distribution13
2.Under the Primary Functions heading, select Web and LAMP Server and under the
Development heading, select C/C++ Compiler and Tools as displayed in Figure 3.
Figure 3 YaST Software Selection and System Tasks
3.Select the Details button to display a table with the detailed software package selections.
4.From the Filter options drop-down list, select Package Groups.
5.In the Package Groups pane, expand the Development group and select Languages from
the expanded list.
Verify that the perl and python components are selected as displayed in Figure 4
Figure 4 SUSE Installation Settings
6.From the Productivity packages group, select Networking.
Verify that the apache2, apache2-prefork, php5, apache2-mod_perl, apache2-mod_php5,
apache2-mod_python, and webalizer components are selected.
Verifying the Linux Distribution Installation
To verify installation of the necessary packages, enter the following command:
If any of these packages are not installed, locate the RPM package on the Linux distribution
media, and install the missing package.
NOTE:By default, the installation enables the iptables firewall, which prevents external
systems from accessing ports below 1024. See “Appendix B: Frequently Asked Questions”
(page 53) and verify the firewall is disabled or the appropriate rules are set to allow the Apache
and Tomcat connection. The system verification steps described later in this document will not
work if the iptables firewall is improperly configured.
Installing, Configuring, and Managing Web Server Middleware Stack
Components
This section explains how to install, configure, and manage the Web Server middleware stack
components not included in the Linux distribution along with other related components. All
components are distributed as RPM packages or binaries, therefore, you can install and remove
all the components separately. Table 1 (page 12) lists the appropriate version and additional
information. You must install the following components separately:
•SUN JDK
•Tomcat
Configuring the Basic Apache HTTP Server
Use the following procedure to configure a basic Apache HTTP Server.
1.Start Apache by entering the following:
# /etc/init.d/apache2 start
2.Verify that Apache starts successfully by ensuring that messages similar to the following
appear in the log file /var/log/apache2/error_log:
[Sat Feb 03 12:41:21 2007] [notice] Apache/2.2.0 (Linux/SUSE) configured -- resuming normal operations
3.Create a file named /srv/www/htdocs/apache.html and add the following lines:
<HTML>
<HEAD>
</HEAD>
<BODY DIR="LTR">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">
<FONT FACE="Times New Roman, serif">
<FONT SIZE=6>Apache http server worked !</FONT>
</FONT></P>
</BODY>
</HTML>
Verify the Apache installation by opening a browser and entering the following website:
http://<YOUR_WEB_SERVER_IP>/apache.html
The following message appears:
Apache HTTP server worked !
Installing and Configuring Sun JDK on an HP Proliant System
For an HP Proliant system, the following procedure to install and configure a Sun Java
Development Kit (JDK):
Installing, Configuring, and Managing Web Server Middleware Stack Components15
1.Download the Sun JDK package from the Java website and install as follows (see Table 1
(page 12) for the correct version and website link):
Change to the Sun JDK install package directory, as appropriate for your system, and install
the package by entering the following command:
# chmod 755 jdk-1_5_0_10-linux-amd64-rpm.bin
# ./jdk-1_5_0_10-linux-amd64-rpm.bin
2.Create a symbolic link for Sun JDK by entering the following:
# ln -s /usr/java/jdk1.5.0_10 /usr/local/jdk
3.The JAVA_HOME environment variable must be properly set before stack components, such
as Tomcat, can begin executing.
To export the JAVA_HOME environment variable, modify the system file that is appropriate
for your shell, /etc/profile.d/alljava.sh or /etc/profile.d/alljava.csh:
For the alljava.sh file, add the following lines:
if [ -x /usr/local/jdk/bin/java ] ; then
export PATH=$PATH:/usr/local/jdk/bin
export JAVA_BINDIR=/usr/local/jdk/bin
export JAVA_ROOT=/usr/local/jdk
export JAVA_HOME=/usr/local/jdk
export JRE_HOME=/usr/local/jdk
unset JDK_HOME
unset SDK_HOME
export JDK_HOME=/usr/local/jdk
export SDK_HOME=/usr/local/jdk
else
if [ -x /usr/lib/java/jre/bin/java ] ; then
# it is IBMJava2-JRE or SunJava2-JRE
export PATH=$PATH:/usr/lib/java/jre/bin
export JAVA_BINDIR=/usr/lib/java/jre/bin
export JAVA_ROOT=/usr/lib/java
export JAVA_HOME=/usr/lib/java/jre
export JRE_HOME=/usr/lib/java/jre
unset JDK_HOME
unset SDK_HOME
fi
fi
For the alljava.csh file, add the following lines:
4.Log out of the system, and then log back in to start using the revised profile.
5.Verify the Sun JDK installation was successful by entering the following:
# java –version
The following messages appear:
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode)
Installing and Configuring Tomcat
The following procedure provides the steps for installing and configuring Tomcat.
NOTE:Prior to installing Apache Tomcat, you must verify that JDK is installed and configured
on your system.
1.Download the Tomcat Web Server package from the Apache Software Foundation website
and follow the instructions provided to install it. See Table 1 (page 12) for the correct version
and website link.
NOTE:In the following steps, it is assumed that Tomcat is installed in
/usr/local/apache-tomcat; if Tomcat is installed in a different directory, replace
/usr/local/apache-tomcat with the correct path.
2.Set the CATALINA_HOME environment variable to the Tomcat directory path by editing
/etc/profile and adding the following lines to the end of the file:
3.Log out of the system, and then log back in to it to start using the revised profile.
4.Start Tomcat by entering the following:
# /usr/local/apache-tomcat/bin/startup.sh
The following messages appear:
Using CATALINA_BASE: /usr/local/apache-tomcat
Using CATALINA_HOME: /usr/local/apache-tomcat
Using CATALINA_TMPDIR: /usr/local/apache-tomcat/temp
Using JRE_HOME: /usr/local/jdk
5.Verify that the Tomcat installation once the startup is complete by opening a browser and
entering the following URL:
Installing, Configuring, and Managing Web Server Middleware Stack Components17
NOTE:If the iptables firewall is enabled, you will not be able to connect to Tomcat from
a remote computer.
6.If necessary, stop Tomcat by entering the following command:
# /usr/local/apache-tomcat/bin/shutdown.sh
The following messages appear:
Using CATALINA_BASE: /usr/local/apache-tomcat
Using CATALINA_HOME: /usr/local/apache-tomcat
Using CATALINA_TMPDIR: /usr/local/apache-tomcat/temp
Using JRE_HOME: /usr/local/jdk
Advanced Apache HTTP Server Features
The following section describes several widely used Apache HTTP Server features.
Using the Apache HTTP Server Benchmarking Tool
The benchmarking tool is supplied with the Apache HTTP Server and is used to benchmark your
Apache HTTP Server and monitor its performance. For example, you can use the benchmarking
tool to perform concurrency requests to an Apache HTTP Server. Use the following command
to start using the benchmarking tool:
# /usr/ab2
Additionally, you can verify the stability of the Apache HTTP Server by running a basic stress
test on the test system. The following steps show a stress test for an example system:
1.Create a file using the following path name: /srv/www/htdocs/abtest.html
2.Add the following lines to the file you created in Step 1:
<HTML>
<HEAD>
</HEAD>
<BODY DIR="LTR">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">
<FONT FACE="Times New Roman, serif">
<FONT SIZE=6>The page is used for Apache benchmarking test !</FONT>
</FONT>
</P>
</BODY>
</HTML>
3.Perform a concurrency request to the test system by logging into another system and entering
the following command: