HP Open Source Middleware Stacks Blueprint
Copyright 2007 Hewlett-Packard Development Company, L.P
Table of Contents
Monitor Tomcat with OpenView Tomcat SPI
Webalizer Usage Report
Oracle Database Test
Page
List of Tables
Page
Executive Summary
HP Services
Introduction
Intended Audience
UserInput
Typographic Conventions
HP Encourages Your Comments
Feedback@fc.hp.com
HP Open Source Web Server Middleware Stack
Web Server Stack Architecture
Web Server Stack Architecture
Installing and Verifying the Linux Distribution
Installing the Linux Distribution
Required Packages and Installation Recommendations
Verifying the Linux Distribution Installation
YaST Software Selection and System Tasks
Tomcat
Configuring the Basic Apache Http Server
Installing and Configuring Sun JDK on an HP Proliant System
# /etc/init.d/apache2 start
# ln -s /usr/java/jdk1.5.010 /usr/local/jdk
For the alljava.sh file, add the following lines
For the alljava.csh file, add the following lines
Following messages appear
Installing and Configuring Tomcat
# java -version
# /usr/local/apache-tomcat/bin/startup.sh
If necessary, stop Tomcat by entering the following command
Advanced Apache Http Server Features
Using the Apache Http Server Benchmarking Tool
# /usr/local/apache-tomcat/bin/shutdown.sh
Apachemodules definition should now look like the following
You can correct the error by entering the following
Apache Http Server Status and Information
Restart the Apache Http Server for the changes take effect
Apache Server Status web page opens, as shown in Figure
Apache Server Information web page opens, as shown in Figure
Apache Http Server Log
# /etc/init.d/apache2 restart
# webalizer
Using Virtual Host Support
For detailed information, see the Webalizer website at
Create the following file
Using Apache Http Server URL Redirection
Configure virtual hosting by creating a file named
On the second server, create the following Html file
Add the following line to the preceding file
Using Apache Http Server Proxy Features
Edit the following configuration file
Add the following lines to the preceding file
Error Responses and Redirects
Create the following Html file
Using Per-User Web Directories
Populate the preceding file with the following lines
Configuring the Apache and Tomcat Connector
Integrating the Web Server Stack Components
Insert the following line below the DocumentRoot line
Restart Apache by entering the following command
If there are any errors, check the following log files
Http//YOURHOSTNAME/jsp-examples
# rpm -q php5 apache2-modphp5
Integrating the Apache Web Server and PHP
Integrating the Apache Web Server and Perl
Create the following test file
Connecting Tomcat to a Database
Integrating the Apache Web Server and Python
Web page displays the following text
Connecting Tomcat and MySQL
# tar zxf mysql-connector-java-version.tar.gz
# ps -efgrep mysqld
# mysqladmin -u root -p create osmsdb
# $CATALINAHOME/bin/startup.sh
# /etc/init.d/mysql start
Http//YOURHOSTNAME8080/mysqltest.jsp
Connecting Tomcat and Oracle
If needed, start Tomcat by entering the following command
Test page opens as shown in Figure
Testing the Oracle Database Connectivity
Obtaining and Installing the Oracle Jdbc Driver
Configuring the Oracle Server
Creating an Oracle Data Source
Http//YOURHOSTNAME8080/oracleTest.jsp
Oracle Database Test
Configuring a Database Driver in Tomcat
Connecting Tomcat to MySQL or Oracle Using Hibernate
Installing Hibernate, Tomcat, and JDK
# mysql -u root -p Password
For a MySQL database server
Creating a Simple Application in Tomcat
# sqlplus osmsusr/osmspass@osmsdbora
For an Oracle database server
Asm.jar asm-attrs.jar antlr-2.7.6rc1.jar
File HibernateSessionFactory.class is generated
Preceding command creates a class file named
This directory, create a Hibernate Pojo file named
Verifying the Simple Application Operation
Http//YOURHOSTNAME8080/SimpleDemo/hibernate.jsp
Secure the Web Server Stack
Enabling Https Support in the Apache Http Server
Restart Apache by entering the following
Verify that the certificate is displayed as in Figure
Apache Http Server Authorization
Apache default document root is
Create the following test Html file
Protecting Apache Http Server Authorization with Symas CDS
If the login fails, the following message appears
Configuring Apache Http Server Services
Protecting Tomcat Authorization with Symas CDS
Html Head
Html Head
Monitor Tomcat with OpenView Tomcat SPI
# $CATALINA/bin/shutdown.sh # $CATALINA/bin/startup.sh
Software Prerequisites and Reference Guides
Tomcat SPI Components
Tools
Policies
Complete these steps
Complete these steps
Appendix B Frequently Asked Questions
# /sbin/SuSEfirewall2 stop
Appendix C Vendor Information Reference
Following are the contents of the hibernate.jsp file
Appendix D Hibernate Test Application Source Code
Page
Appendix D Hibernate Test Application Source Code