HP 5991-5565 manual Monitor Tomcat with OpenView Tomcat SPI

Page 48

<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 44).

6.Restart Tomcat by entering the following commands:

#$CATALINA/bin/shutdown.sh

#$CATALINA/bin/startup.sh

7.Verify that the Tomcat LDAP authentication is operating properly by navigating to the following website:

http://<YOUR_TOMCAT_SERVER_IP>:port/<YOUR_APPLICATION_NAME>

For example: http://10.101.1.26:8080/myweb/index.html

8.When prompted, log in with the user name tomy and the password tom. If the login fails, the following message appears:

Access to the requested resource has been denied.

The tomy user does not belong to the tomcat group so the authentication failed. This failure proves that the Apache Web server authentication services are operating properly.

This can be verified further by entering the user name benw and password ben. The following message appears:

Integration of tomcat and CDS succeed!

Monitor Tomcat with OpenView Tomcat SPI

Tomcat is a free, open-source implementation of the Java Servlet and JavaServer Pages technologies that was developed as part of the Jakarta project from the Apache Software Foundation (ASF). Tomcat 5 implements the Servlet 2.3 and JavaServer Page 1.2 specifications from Java Software. It includes many additional features making it a useful platform for developing and deploying web applications and services. For more information regarding the Tomcat Servlet Engine, see the Tomcat website as listed in Table 1 (page 12).

HP enhances the OSMS Web Services by using HP OpenView Operations Gallery Smart Plug-Ins (OVO SPIs). HP OVO is a distributed client/server software solution designed to provide service-driven event and performance management of business-critical enterprise systems, applications, and services.

The SPI for Tomcat (Tomcat SPI) provides availability, resource, and process monitoring for the Tomcat Servlet Engine from one central management console. This software is provided free to all customers of HP OVO for use under the terms and conditions documented on the download web page. This SPI provides powerful, centralized tools to monitor and manage the operation of multiple installations of Tomcat servers.

Tomcat-SPI provides powerful, centralized tools to monitor and manage the operation of multiple installations of the Tomcat Servlet Engine. The features include the following:

Monitor availability of Tomcat servers

Monitor CPU utilization by the server

Monitor memory utilization by the server

Monitor processes

48

Image 48
Contents 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 TestPage List of Tables Page HP Services IntroductionExecutive Summary Intended AudienceTypographic Conventions HP Encourages Your CommentsUserInput Feedback@fc.hp.comHP Open Source Web Server Middleware Stack Web Server Stack ArchitectureWeb Server Stack Architecture Installing and Verifying the Linux Distribution Installing the Linux DistributionRequired Packages and Installation Recommendations Verifying the Linux Distribution Installation YaST Software Selection and System TasksConfiguring the Basic Apache Http Server Installing and Configuring Sun JDK on an HP Proliant SystemTomcat # /etc/init.d/apache2 start# 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 Installing and Configuring Tomcat # java -versionFollowing messages appear # /usr/local/apache-tomcat/bin/startup.shAdvanced Apache Http Server Features Using the Apache Http Server Benchmarking ToolIf necessary, stop Tomcat by entering the following command # /usr/local/apache-tomcat/bin/shutdown.shYou can correct the error by entering the following Apache Http Server Status and InformationApachemodules definition should now look like the following Restart the Apache Http Server for the changes take effectApache Server Status web page opens, as shown in Figure Apache Server Information 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 Using Apache Http Server Proxy Features Edit the following configuration fileAdd the following line to the preceding file Add the following lines to the preceding fileError Responses and Redirects Create the following Html fileUsing Per-User Web Directories Populate the preceding file with the following linesConfiguring the Apache and Tomcat Connector Integrating the Web Server Stack ComponentsRestart Apache by entering the following command If there are any errors, check the following log filesInsert the following line below the DocumentRoot line Http//YOURHOSTNAME/jsp-examplesIntegrating the Apache Web Server and PHP Integrating the Apache Web Server and Perl# rpm -q php5 apache2-modphp5 Create the following test fileConnecting Tomcat to a Database Integrating the Apache Web Server and PythonWeb page displays the following text Connecting Tomcat and MySQL # tar zxf mysql-connector-java-version.tar.gz# mysqladmin -u root -p create osmsdb # $CATALINAHOME/bin/startup.sh# ps -efgrep mysqld # /etc/init.d/mysql startConnecting Tomcat and Oracle If needed, start Tomcat by entering the following commandHttp//YOURHOSTNAME8080/mysqltest.jsp Test page opens as shown in FigureObtaining and Installing the Oracle Jdbc Driver Configuring the Oracle ServerTesting the Oracle Database Connectivity Creating an Oracle Data SourceHttp//YOURHOSTNAME8080/oracleTest.jsp Oracle Database TestConnecting Tomcat to MySQL or Oracle Using Hibernate Installing Hibernate, Tomcat, and JDKConfiguring a Database Driver in Tomcat # mysql -u root -p PasswordCreating a Simple Application in Tomcat # sqlplus osmsusr/osmspass@osmsdboraFor a MySQL database server For an Oracle database serverAsm.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 namedVerifying the Simple Application Operation Http//YOURHOSTNAME8080/SimpleDemo/hibernate.jspSecure the Web Server Stack Enabling Https Support in the Apache Http ServerRestart Apache by entering the following Apache Http Server Authorization Apache default document root isVerify that the certificate is displayed as in Figure Create the following test Html fileProtecting Apache Http Server Authorization with Symas CDS If the login fails, the following message appearsConfiguring Apache Http Server Services Protecting Tomcat Authorization with Symas CDS Html HeadHtml Head Monitor Tomcat with OpenView Tomcat SPI # $CATALINA/bin/shutdown.sh # $CATALINA/bin/startup.shSoftware Prerequisites and Reference Guides Tomcat SPI ComponentsTools PoliciesComplete these steps Complete these steps Appendix B Frequently Asked Questions # /sbin/SuSEfirewall2 stopAppendix C Vendor Information Reference Following are the contents of the hibernate.jsp file Appendix D Hibernate Test Application Source CodePage Appendix D Hibernate Test Application Source Code