Manuel d'utilisation / d'entretien du produit 5991-5565 du fabricant HP (Hewlett-Packard)
Aller à la page of 57
HP Open S our ce Mi ddle w ar e St ac ks Bluepr int: W eb Se r v er on HP Pr oL i ant Se r v er s w ith S U SE L inu x Ent er pr ise Se r v er V er si on 1 0 HP P ar t Numbe r: 5 99 1 -5 56 5 P ublished: August 200 7 E dition: 3 .
© Copyright 2007 Hewlett-P ackard Development Company , L.P . Legal Notice Confidential computer softw are. V alid license from HP required for possession, use or copying. Consistent with F AR 12.211 and 12.212, Commercial Computer Softw are, Computer Software Documentation, and T echnical Data for Commercial Items are licensed to the U.
T able o f C onte nts Introduction ............................................................................................................................................ 9 Ex ec ut iv e Su mm ar y ................................................
Cr ea ti ng a S im pl e Ap pl ic at io n in T o mc at ..................................................................................37 V er if yi ng t he S im pl e Ap p li ca ti on O p er at io n....................................................
L ist of F igur es 1 W eb S er v e r St ac k Ar ch it e ct ur e......................................................................................................1 2 2 W eb S er ve r H ar dw ar e En vi ro nm en t....................................
6.
L ist of T ables 1 So ft w ar e T es t C on fi gu ra t io n..........................................................................................................1 2 2 Re qu ir ed O VO W P at ch es ..................................................
8.
Intr oducti on Ex ec uti ve 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 softw are in their IT environments.
T y pogra phic C on ve ntions This document uses the following typographical conventions. Command A command name or qualified command phrase. ComputerOut T ext 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 y ou press another key or button.
HP Open S our ce W eb Serve r Middle war e St ack The following components comprise the HP OSMS W eb Server Middlew are Stack: Apache W eb Server The Apache W eb Server is a mature open source w eb server that has become the de facto standard because of its high adoption rate on the Internet.
Figur e 1 W eb Ser ver Stack Architecture T able 1 lists the software used to test the configurations described in this blueprint. T abl e 1 Softwar e T est Configuration W ebsite Link Distributor P ackage Name P ackage V ersion Software Apache httpd website Novell apache2.
NO TE: The installation and configuration of the MySQL and Oracle databases are not cov ered 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.
2. Under the Primary Functions heading, select W eb and LAMP Server and under the Development heading, select C/C++ Compiler and T ools as displayed in Figure 3 . Figur e 3 Y aST Software Selection and S ystem T asks 3. Select the Details button to display a table with the detailed software package selections.
# 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 distribution media, and install the missing package.
1. Download the Sun JDK package from the Jav a website and install as follows (see T able 1 (page 12) for the correct version and w ebsite 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.
4. Log out of the system, and then log back in to start using the revised profile. 5. V erify the Sun JDK installation w as 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.
NO TE: If the iptables firew all is enabled, you will not be able to connect to T omcat from a remote computer . 6. If necessary , stop T omcat by entering the following command: # /usr/local/apache-tomcat/bin/shutdown.
Y ou can force a heavier load on the Apache HTTP Server by increasing the number of concurrency requests with the -c option, and by prolonging the testing round by increasing the number of requests with the -n option.
5. V erify that the /etc/apache2/sysconfig.d/loadmodule.conf file contains the following lines: LoadModule info_module /usr/lib64/apache2-prefork/mod_info.so LoadModule status_module /usr/lib64/apache2-prefork/mod_status.so If these two lines exist , then the tw o modules have loaded successfully .
Apac he HTTP Ser v er Log The Apache HTTP Server provides a detailed and flexible information-logging mechanism. The two most important log files are the error and access logs.
Figur e 8 W ebalizer Usage Report For detailed information, see the W ebalizer website at: http://www .mrunix.net/webalizer/ Using V irtual Host Support A virtual host runs more than one w ebsite on a single server . For example, www .website1.com and www .
8. P opulate 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.
</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 y our Apache HTTP server , for the preceding changes to take effect: # /etc/init.
6. V iew the access log file on the Apache Proxy server . Messages similar to the following are contained 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.
3. V erify the custom local URL redirect message by opening a browser and entering the following website: http:// <YOUR_WEB_SERVER_IP> /non-exist The following message appears: The page you requ.
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"> <FONT FACE="Times New Roman, serif"> <FONT SIZE=6>The is personal homepage of user tester .
3. Insert the following line below the DocumentRoot line: JkMount /jsp-examples/* worker1 4. Before you can v erify the T omcat and Apache integration, you must set T omcat to listen for AJP13 requests.
/var/log/apache2/error_log /var/log/apache2/access_log /var/log/apache2/mod_jk.log Integr ating the Apache W eb Server and P HP The Apache W eb server that is shipped with the supported Linux distribution includes a built-in PHP module. Therefore, no extra configuration is required for Apache.
Integr ating the Apache W eb Server and Pyth on The apache2 – mod_python module embeds the Python environment into the Apache W eb server . Embedding this environment avoids the run-time ov erhead of starting the Python environment externally . Use the apache2 – mod_python package provided by the Linux distribution.
Figur e 1 1 T omcat Connections Using JDBC T omcat uses the data-source concept to create database connections. A data source must be configured in an XML configuration file. The data source provides details about the target database, such as the database server IP address and login credentials.
1. Create a data source descriptor file named $CATALINA_HOME/conf/context.xml and insert the following lines: <Context> … <Resource name="jdbc/mysqlDB" auth="Container" type="javax.sql.DataSource" driverClassName="com.
1. Create a JSP file named $CATALINA_HOME/webapps/ROOT/mysqltest.jsp and insert the following lines: <%@page contentType="text/html" import="java.
layer for w eb applications. A JDBC connector for Oracle is needed to integrate an external Oracle Database server with the T omcat W eb server . This section describes the steps for connecting the T omcat W eb server to an Oracle database.
1. Create a JSP file named $CATALINA_HOME/webapps/ROOT/oracleTest.jsp and insert the following lines: <%@page contentType="text/html" import="java.
Co nnecting T omcat to MyS QL or Or acle U sing Hiber nate Hibernate is an open-source object and relational mapping framework. It uses a lightweight object encapsulation for JDBC and allows JA V A developers to access data from databases using JA V A objects.
1. Log in to Oracle using the user name osmsusr and password osmspass by entering the following command: # sqlplus osmsusr/osmspass@osmsdb_ora 2. In the Oracle database identified by the Oracle SID, o.
maxWait="5000" username="osmsusr" url="jdbc:oracle:thin:@IP_OR_HOSTNAME_OF_DB_SERVER:1521:osmsdb_ora" maxActive="15"/> </Context> Where: IP_OR_HOSTNAME_OF_DB_SERVER is the MySQL or Oracle database server name or IP address.
/osms/hibernate/utility and add the following lines so the application can interact with Hibernate: package com.hp.osms.hibernate.utility; import org.hibernate.
<property name="firstName" type="java.lang.String"> <column name="FIRST_NAME" length="30" /> </property> <property name="lastName" type="java.
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.
Sec ure the W eb Serv er Stac k This section covers w eb server security . • Data T ransportation —Secure Sockets Layer (SSL) is a widely used technology to protect data transfer . SSL enablement methods for both the Apache W eb server and T omcat Application server .
5. P erform the test by navigating to the website located at: https://< YOUR_HOSTNAME > V erify that the certificate is displayed as in Figure 15 : Figur e 1 5 SSL_Enabled Apache Apac he HTTP Ser v er Auth ori z ation The Apache default document root is: /srv/www/htdocs A directory named test must exist in the document root directory .
Cr eating a P ass wo rd F ile 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.
NO TE: In the steps for this procedure: rootdn is set to "cn=Manager,dc=example,dc=com" rootpw is set to secret in the slapd.conf file 1. Create a file named webbase.
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/index.
1. Create a web application named myweb in y our T omcat W eb server by adding the following code to the file $CATALINA_HOME/conf/server.xml : TIP: T o apply the following <Realm/> configuration to all of your virtual machines, insert it between the <Engine/> tags.
<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) .
NO TE: 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.
T ools T able 3 provides an overview of the Tools group in the T omcat Servlet Engine SPI (SESPI). T abl e 3 SE- SPI Applications of the T ool Group Description Servlet Engine SPI Creates the SESPI directory and configurations files and libraries required by the SPI.
Appendi x A: Chec klist f or Building a W eb Serve r Middle w ar e Stac k The following checklist is intended to assist y ou in building a W eb Server Middlew are Stack in your environment. Status Complete these steps: Install and verify the Linux installation.
Status Complete these steps: Implement T omcat authorization with Symas CDS (page 46) . 12 Configure T omcat monitoring with HP OVOW (page 48) . 13 52.
Appendi x B: F r equentl y Ask ed Q uesti ons Q : How do I disable firew all settings? A : By default, SLES has a firew all enabled. This prevents external systems from accessing ports below 1024. Enter the following to disable the firew all: # /sbin/SuSEfirewall2 stop CA UTION: Disabling the firewall is not advisable.
Appendi x C: V endor Inf or mation R efe r ence This appendix provides references to the v endors that are referenced in the HP OSMS W eb Server stack. These web resources contain a w ealth of information and HP encourages you to review each of them. Apache HTTP Server V ersion 2.
Appendi x D: Hiber nate T est A pplicati on So ur ce Code This appendix provides the contents of the following tw o Hibernate T est Application source code files: • HibernateSessionFactory.java • hibernate.jsp The following are the contents of the HibernateSessionFactory.
public void showData(JspWriter out,List list) { Iterator it = list.iterator(); try{ out.print("<table width='100%' border='1' cellspacing='0' cellpadding='0'><tr>"); out.
{ HibernateSessionFactory.closeSession(); } %> <body><div align="center"><font size="7">OSMS Hibernate Test Page</font> <%initSession();%> </div><h2>1.Retrieve data from table USERS via hibernate<br> <%showData(out,queryAll());%> <h2>2.
Un point important après l'achat de l'appareil (ou même avant l'achat) est de lire le manuel d'utilisation. Nous devons le faire pour quelques raisons simples:
Si vous n'avez pas encore acheté HP (Hewlett-Packard) 5991-5565 c'est un bon moment pour vous familiariser avec les données de base sur le produit. Consulter d'abord les pages initiales du manuel d'utilisation, que vous trouverez ci-dessus. Vous devriez y trouver les données techniques les plus importants du HP (Hewlett-Packard) 5991-5565 - de cette manière, vous pouvez vérifier si l'équipement répond à vos besoins. Explorant les pages suivantes du manuel d'utilisation HP (Hewlett-Packard) 5991-5565, vous apprendrez toutes les caractéristiques du produit et des informations sur son fonctionnement. Les informations sur le HP (Hewlett-Packard) 5991-5565 va certainement vous aider à prendre une décision concernant l'achat.
Dans une situation où vous avez déjà le HP (Hewlett-Packard) 5991-5565, mais vous avez pas encore lu le manuel d'utilisation, vous devez le faire pour les raisons décrites ci-dessus,. Vous saurez alors si vous avez correctement utilisé les fonctions disponibles, et si vous avez commis des erreurs qui peuvent réduire la durée de vie du HP (Hewlett-Packard) 5991-5565.
Cependant, l'un des rôles les plus importants pour l'utilisateur joués par les manuels d'utilisateur est d'aider à résoudre les problèmes concernant le HP (Hewlett-Packard) 5991-5565. Presque toujours, vous y trouverez Troubleshooting, soit les pannes et les défaillances les plus fréquentes de l'apparei HP (Hewlett-Packard) 5991-5565 ainsi que les instructions sur la façon de les résoudre. Même si vous ne parvenez pas à résoudre le problème, le manuel d‘utilisation va vous montrer le chemin d'une nouvelle procédure – le contact avec le centre de service à la clientèle ou le service le plus proche.