Page 5 - List of Figures
List of Figures 1 Web Server Stack Architecture......................................................................................................12 2 Web Server Hardware Environment.............................................................................................13 3 YaST Software Sel...
Page 7 - List of Tables
List of Tables 1 Software Test Configuration..........................................................................................................12 2 Required OVOW Patches..............................................................................................................49 3 SE-SPI Ap...
Page 9 - Executive Summary
Introduction Executive Summary The HP Open Source Integrated Portfolio (HP OSIP) comprises a range of products and servicesdesigned to verify that customers can successfully realize the cost and feature benefits of adoptingopen source software in their IT environments. HP Open Source foundation comp...
Page 10 - Typographic Conventions; Command; Ctrl; ENVIRONVAR; Key; VARIABLE; HP Encourages Your Comments
Typographic Conventions This document uses the following typographical conventions. Command A command name or qualified command phrase. ComputerOut Text displayed by the computer. Ctrl-x A key sequence. A sequence such as Ctrl-x indicates that you must hold down the key labeled Ctrl while you press ...
Page 11 - Web Server Stack Architecture; Figure 1
HP Open Source Web Server Middleware Stack The following components comprise the HP OSMS Web Server Middleware Stack: Apache Web Server The Apache Web Server is a mature open source web server that hasbecome the de facto standard because of its high adoption rate onthe Internet. Apache Tomcat Apache...
Page 13 - Installing the Linux Distribution; Required Packages and Installation Recommendations; From the Installation Settings screen of YaST, select the; Software
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 ProLiantservers with database files on Modular Smart Array (MSA) 1000 storage. All other software listedin Table 1 are installed...
Page 14 - Verifying the Linux Distribution Installation
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 select...
Page 15 - Configuring the Basic Apache HTTP Server; Apache HTTP server worked !; Installing and Configuring Sun JDK on an HP Proliant System
# rpm –q apache2 apache2-prefork apache2–mod_perl apache2–mod_python \ apache2–mod_php5 webalizer If any of these packages are not installed, locate the RPM package on the Linux distributionmedia, and install the missing package. NOTE: By default, the installation enables the iptables firewall, whic...
Page 16 - Table 1
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 installthe package by entering the following command: # chmod 755 jdk-1_...
Page 17 - Installing and Configuring Tomcat; Figure 5
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_...
Page 18 - iptables; Advanced Apache HTTP Server Features; Using the Apache HTTP Server Benchmarking Tool
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-tomcatUsing CA...
Page 19 - Apache HTTP Server Status and Information; Configuring and Using the Modules; info status; dir env expires include log_config mime negotiation setenvif ssl
You can force a heavier load on the Apache HTTP Server by increasing the number of concurrencyrequests with the -c option, and by prolonging the testing round by increasing the number of requests with the -n option. NOTE: If you encounter the following error: socket: Too many open files (24) You can...
Page 21 - Apache HTTP Server Log; Using the Error Log to Diagnose the Apache HTTP Server
Apache HTTP Server Log The Apache HTTP Server provides a detailed and flexible information-logging mechanism. Thetwo most important log files are the error and access logs. The default location for the ApacheHTTP Server log files is the following directory: /var/log/apache2 Using the Error Log to Di...
Page 22 - Figure 8 Webalizer Usage Report; Using Virtual Host Support
Figure 8 Webalizer Usage Report For detailed information, see the Webalizer website at: http://www.mrunix.net/webalizer/ Using Virtual Host Support A virtual host runs more than one website on a single server. For example, www.website1.comand www.website2.com can be hosted on the same server. The mo...
Page 23 - Using Apache HTTP Server URL Redirection
8. Populate the file that you created in Step 7 with 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>This is www.website2.com<...
Page 24 - Using Apache HTTP Server Proxy Features
</BODY></HTML> 4. Edit the following configuration file: /etc/apache2/default-server.conf Add the following line to the preceding file: Redirect permanent /testdir http://<ANOTHER_WEB_SERVER_IP>/test.html 5. Use the following command to restart your Apache HTTP server, for the prec...
Page 25 - Error Responses and Redirects; Customizing Plain Text Responses; Customizing Local URL Redirect Responses
6. View the access log file on the Apache Proxy server. Messages similar to the following arecontained in the file: YOUR_WEB_BROSWER_IP - - [03/Feb/2007:13:30:48 -0500] "GET http://YOUR_WEB_SERVER_IP/test.html HTTP/1.0" 200 206 "-" "ApacheBench/2.0.40-dev" View the access log...
Page 26 - Customizing External URL Redirect Responses; Using Per-User Web Directories; UserDir
3. Verify the custom local URL redirect message by opening a browser and entering thefollowing website: http://<YOUR_WEB_SERVER_IP>/non-exist The following message appears: The page you request does not exist!Local redirects example Customizing External URL Redirect Responses The URL redirect ...
Page 27 - Integrating the Web Server Stack Components; Configuring the Apache and Tomcat Connector; Figure 9
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"> <FONT FACE="Times New Roman, serif"> <FONT SIZE=6>The is personal homepage of user tester .</FONT> </FONT></P> </BODY></HTML> 3. Verify that the per-user web directory configuration was succes...
Page 29 - perl
/var/log/apache2/error_log/var/log/apache2/access_log/var/log/apache2/mod_jk.log Integrating the Apache Web Server and PHP The Apache Web server that is shipped with the supported Linux distribution includes a built-inPHP module. Therefore, no extra configuration is required for Apache. Use the foll...
Page 30 - Integrating the Apache Web Server and Python; python; Connecting Tomcat to a Database
Integrating the Apache Web Server and Python The apache2–mod_python module embeds the Python environment into the Apache Web server. Embedding this environment avoids the run-time overhead of starting the Pythonenvironment externally. Use the apache2–mod_python package provided by the Linux distribu...
Page 31 - Connecting Tomcat and MySQL; Obtaining and Installing the JDBC Drivers
Figure 11 Tomcat Connections Using JDBC Tomcat uses the data-source concept to create database connections. A data source must beconfigured in an XML configuration file. The data source provides details about the targetdatabase, such as the database server IP address and login credentials. The JDBC ...
Page 33 - Connecting Tomcat and Oracle
1. Create a JSP file named $CATALINA_HOME/webapps/ROOT/mysqltest.jsp and insert the following lines: <%@page contentType="text/html" import="java.io.*,java.sql.*,javax.sql.*,javax.naming.*"%><html> <head> <title>Tomcat->MySQL Test </title> <link re...
Page 34 - Obtaining and Installing the Oracle JDBC Driver; Perform the following steps from the Tomcat Web server:; Creating an Oracle Data Source; Create a file named; Configuring the Oracle Server; Perform the following steps on the Oracle Database server:; SQL> create user osmsusr identified by osmspass; Testing the Oracle Database Connectivity
layer for web applications. A JDBC connector for Oracle is needed to integrate an external OracleDatabase server with the Tomcat Web server. This section describes the steps for connecting theTomcat Web server to an Oracle database. Obtaining and Installing the Oracle JDBC Driver Perform the followi...
Page 36 - Connecting Tomcat to MySQL or Oracle Using Hibernate; “Installing and Configuring Tomcat” (page 17); Configuring a Database Driver in Tomcat; “Connecting Tomcat to a Database” (page 30); Adding Test Data to the Databases; osmsdb
Connecting Tomcat to MySQL or Oracle Using Hibernate Hibernate is an open-source object and relational mapping framework. It uses a lightweightobject encapsulation for JDBC and allows JAVA developers to access data from databases usingJAVA objects. Hibernate is designed to run in a managed environme...
Page 37 - Creating a Simple Application in Tomcat; USERS
1. Log in to Oracle using the user name osmsusr and password osmspass by entering thefollowing command: # sqlplus osmsusr/osmspass@osmsdb_ora 2. In the Oracle database identified by the Oracle SID, osmsdb_ora , create a table named USERS , and then sequence with the osmsusr user by entering the foll...
Page 41 - Verifying the Simple Application Operation; The OSMS Hibernate Test web page is displayed as shown in
org.hibernate.Session hbsession = HibernateSessionFactory.getSession();try{ Transaction tx = hbsession.beginTransaction();Users users= new Users(); users.setFirstName("Smith"); users.setLastName("Barney"); hbsession.save(users); hbsession.flush(); tx.commit(); }catch(HibernateExcepti...
Page 42 - Secure the Web Server Stack; Enabling HTTPS Support in the Apache HTTP Server; ssl
Secure the Web Server Stack This section covers web server security. • Data Transportation—Secure Sockets Layer (SSL) is a widely used technology to protectdata transfer. SSL enablement methods for both the Apache Web server and TomcatApplication server. • Application Authentication— Apache Web serv...
Page 43 - Figure 15 SSL_Enabled Apache; Apache HTTP Server Authorization; Creating a Test index.html File
5. Perform the test by navigating to the website located at: https://<YOUR_HOSTNAME> Verify that the certificate is displayed as in Figure 15 : Figure 15 SSL_Enabled Apache Apache HTTP Server Authorization The Apache default document root is: /srv/www/htdocs A directory named test must exist i...
Page 44 - Protecting Apache HTTP Server Authorization with Symas CDS; Configuring CDS and LDAP Services
Creating a Password File Create a password file to contain the HTTPS server passwords using the following steps: 1. Create the password directory by entering the following command: # mkdir /etc/apache2/passwd 2. Create and update the user password file by entering the following command: # htpasswd2 ...
Page 46 - Protecting Tomcat Authorization with Symas CDS
1. Edit the following file: /etc/apache2/default-server.conf Add the ldap and authnz_ldap modules to the APACHE_MODULES line. Once this edit is complete, the line should look like the following: APACHE_MODULES= "... ... ldap authnz_ldap" 2. Create the following file: /srv/www/htdocs/ldaptest...
Page 47 - myweb
1. Create a web application named myweb in your Tomcat Web server by adding the following code to the file $CATALINA_HOME/conf/server.xml : TIP: To apply the following <Realm/> configuration to all of your virtual machines, insert it between the <Engine/> tags. You can also apply it to t...
Page 48 - “Configuring CDS and LDAP Services”; Monitor Tomcat with OpenView Tomcat SPI
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"> <FONT FACE="Times New Roman, serif" SIZE=6> Integration of tomcat and CDS succeed! </FONT> </P> </BODY></HTML> 5. Configure the directory service as described in “Configuring CDS and LDAP Services” (page ...
Page 49 - Software Prerequisites and Reference Guides; Table 2; Tomcat SPI Components; Tools
NOTE: The HP OVO Management server runs on either HP-UX or Windows systems. The examples in this blueprint use HP OVOW. Figure 16 illustrates the SPIs architecture and OpenView components. Figure 16 OVOW Architecture Software Prerequisites and Reference Guides Before attempting to install the Tomcat...
Page 50 - Table 3; Policies; Table 4
Tools Table 3 provides an overview of the Tools group in the Tomcat Servlet Engine SPI (SESPI). Table 3 SE-SPI Applications of the Tool Group Description Servlet Engine SPI Creates the SESPI directory and configurations files and libraries requiredby the SPI. Configure Tomcat Instrumentation Shuts d...
Page 51 - Appendix A: Checklist for Building a Web Server Middleware Stack
Appendix A: Checklist for Building a Web Server Middleware Stack The following checklist is intended to assist you in building a Web Server Middleware Stack inyour environment. Status Complete these steps: Install and verify the Linux installation. 1 Configure the basic Apache HTTP Server (page 15) ...
Page 53 - Q: How do I open specific ports without disabling the firewall?
Appendix B: Frequently Asked Questions Q: How do I disable firewall settings? A: By default, SLES has a firewall enabled. This prevents external systems from accessing portsbelow 1024. Enter the following to disable the firewall: # /sbin/SuSEfirewall2 stop CAUTION: Disabling the firewall is not advi...
Page 54 - Appendix C: Vendor Information Reference
Appendix C: Vendor Information Reference This appendix provides references to the vendors that are referenced in the HP OSMS Web Serverstack. These web resources contain a wealth of information and HP encourages you to revieweach of them. Apache HTTP Server Version 2.2Documentation Provides all the ...
Page 55 - HibernateSessionFactory.java
Appendix D: Hibernate Test Application Source Code This appendix provides the contents of the following two Hibernate Test Application sourcecode files:• HibernateSessionFactory.java • hibernate.jsp The following are the contents of the HibernateSessionFactory.java file: package com.hp.osms.hibernat...