HP 5991-5565 manual Complete these steps

Page 51

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 in your environment.

 

Complete these steps:

Status

1

Install and verify the Linux installation.

 

2

Configure the basic Apache HTTP Server (page 15).

 

3

Install and configure Sun JDK or BEA JRockit.

 

4

Install and configure Tomcat (page 17).

 

5

Implement any advanced Apache HTTP server features—Optional

 

(page 18).

 

 

 

6

Integrate the Web Server stack components (page 27).

 

 

a. Configure the Apache Web server and Tomcat connector.

 

 

b. Integrate the Apache Web server and PHP.

 

 

c. Integrate the Apache Web server and Perl.

 

 

d. Integrate the Apache Web server and Python.

 

7

Connect Tomcat to a MySQL (page 31) or Oracle Server (page 33).

 

 

a. Download the JDBC drivers.

 

 

b. Create a data source.

 

 

c. Configure the MySQL or Oracle server.

 

 

d. Test the MySQL or Oracle server connectivity

 

8

Connect Tomcat to MySQL or Oracle using Hibernate (page 36).

 

 

a. Install Hibernate3, Tomcat, and JDK.

 

 

b. Configure MySQL or Oracle drivers in Tomcat.

 

 

c. Add test data to the database.

 

 

d. Create a simple demonstration application in Tomcat.

 

 

e. Verify the simple demonstration application operation.

 

9

Enable HTTPS support in the Apache HTTP Server (page 42).

 

10

Implement Apache HTTP Server authorization (page 43).

 

 

a. Create a test HTML file.

 

 

b. Configure the authorized overrides.

 

 

c. Create a password file.

 

d. Create the distributed configuration file. e. Restart the server.

f. Verify the authentication and authorization operations.

11Implement Apache HTTP Server authorization with Symas CDS (page 44).

a. Configure CDS and LDAP services.

b. Configure Apache HTTP Server services.

Appendix A: Checklist for Building a Web Server Middleware Stack 51

Image 51
Contents HP Open Source Middleware Stacks Blueprint Copyright 2007 Hewlett-Packard Development Company, L.P Table of Contents Monitor Tomcat with OpenView Tomcat SPI Oracle Database Test Webalizer Usage ReportPage List of Tables Page Intended Audience HP ServicesIntroduction Executive SummaryFeedback@fc.hp.com Typographic ConventionsHP Encourages Your Comments UserInputWeb Server Stack Architecture HP Open Source Web Server Middleware StackWeb Server Stack Architecture Installing and Verifying the Linux Distribution Installing the Linux DistributionRequired Packages and Installation Recommendations YaST Software Selection and System Tasks Verifying the Linux Distribution Installation# /etc/init.d/apache2 start Configuring the Basic Apache Http ServerInstalling and Configuring Sun JDK on an HP Proliant System Tomcat# ln -s /usr/java/jdk1.5.010 /usr/local/jdk For the alljava.sh file, add the following linesFor the alljava.csh file, add the following lines # /usr/local/apache-tomcat/bin/startup.sh Installing and Configuring Tomcat# java -version Following messages appear# /usr/local/apache-tomcat/bin/shutdown.sh Advanced Apache Http Server FeaturesUsing the Apache Http Server Benchmarking Tool If necessary, stop Tomcat by entering the following commandRestart the Apache Http Server for the changes take effect You can correct the error by entering the followingApache Http Server Status and Information Apachemodules definition should now look like the followingApache Server Information web page opens, as shown in Figure Apache Server Status web page opens, as shown in FigureApache Http Server Log # /etc/init.d/apache2 restart# webalizer Using Virtual Host Support For detailed information, see the Webalizer website atCreate the following file Using Apache Http Server URL Redirection Configure virtual hosting by creating a file namedOn the second server, create the following Html file Add the following lines to the preceding file Using Apache Http Server Proxy FeaturesEdit the following configuration file Add the following line to the preceding fileCreate the following Html file Error Responses and RedirectsPopulate the preceding file with the following lines Using Per-User Web DirectoriesIntegrating the Web Server Stack Components Configuring the Apache and Tomcat ConnectorHttp//YOURHOSTNAME/jsp-examples Restart Apache by entering the following commandIf there are any errors, check the following log files Insert the following line below the DocumentRoot lineCreate the following test file Integrating the Apache Web Server and PHPIntegrating the Apache Web Server and Perl # rpm -q php5 apache2-modphp5Connecting Tomcat to a Database Integrating the Apache Web Server and PythonWeb page displays the following text # tar zxf mysql-connector-java-version.tar.gz Connecting Tomcat and MySQL# /etc/init.d/mysql start # mysqladmin -u root -p create osmsdb# $CATALINAHOME/bin/startup.sh # ps -efgrep mysqldTest page opens as shown in Figure Connecting Tomcat and OracleIf needed, start Tomcat by entering the following command Http//YOURHOSTNAME8080/mysqltest.jspCreating an Oracle Data Source Obtaining and Installing the Oracle Jdbc DriverConfiguring the Oracle Server Testing the Oracle Database ConnectivityOracle Database Test Http//YOURHOSTNAME8080/oracleTest.jsp# mysql -u root -p Password Connecting Tomcat to MySQL or Oracle Using HibernateInstalling Hibernate, Tomcat, and JDK Configuring a Database Driver in TomcatFor an Oracle database server Creating a Simple Application in Tomcat# sqlplus osmsusr/osmspass@osmsdbora For a MySQL database serverAsm.jar asm-attrs.jar antlr-2.7.6rc1.jar File HibernateSessionFactory.class is generated This directory, create a Hibernate Pojo file named Preceding command creates a class file namedHttp//YOURHOSTNAME8080/SimpleDemo/hibernate.jsp Verifying the Simple Application OperationSecure the Web Server Stack Enabling Https Support in the Apache Http ServerRestart Apache by entering the following Create the following test Html file Apache Http Server AuthorizationApache default document root is Verify that the certificate is displayed as in FigureIf the login fails, the following message appears Protecting Apache Http Server Authorization with Symas CDSConfiguring Apache Http Server Services Html Head Protecting Tomcat Authorization with Symas CDSHtml Head # $CATALINA/bin/shutdown.sh # $CATALINA/bin/startup.sh Monitor Tomcat with OpenView Tomcat SPITomcat SPI Components Software Prerequisites and Reference GuidesPolicies ToolsComplete these steps Complete these steps # /sbin/SuSEfirewall2 stop Appendix B Frequently Asked QuestionsAppendix C Vendor Information Reference Appendix D Hibernate Test Application Source Code Following are the contents of the hibernate.jsp filePage Appendix D Hibernate Test Application Source Code