Resumo do conteúdo contido na página número 1
HP Ope n S o ur ce M i ddle w ar e S t ac ks
Bluepr in t:
W eb S e r v e r o n HP Pr oL i an t S e r v e r s w ith S U SE L in u x
En t e r pr is e S e r v e r V e r si o n 1 0
HP P ar t Numbe r : 5 9 9 1 -5 5 6 5
P u blished: A ugu s t 200 7
E diti o n: 3 . 0
Resumo do conteúdo contido na página número 2
© Copyright 2007 Hewlett-P ackard Dev elopment Company , L.P . Leg al 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 Softw are Documentation, and T echnical Data for Commercial Items are licensed to the U.S. Gov ernment under v endor's standard commercial license. The information contained herein is subject to change without notice. The only w arranties for HP
Resumo do conteúdo contido na página número 3
T a ble o f C o n t e n ts Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Executiv e Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 4
Creating a Simple Application in T omcat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 V erifying the Simple Application Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Secure the W eb Serv er Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 5
L is t o f F i gur e s 1 W eb Serv er Stack Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 W eb Serv er Hardw are Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3 Y aST Sof
Resumo do conteúdo contido na página número 6
6
Resumo do conteúdo contido na página número 7
L is t o f T a ble s 1 Softw are T est Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 Required OVOW P atches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Resumo do conteúdo contido na página número 8
8
Resumo do conteúdo contido na página número 9
In tr odu c ti o n Ex ec u ti v e Summar y The HP Open Source Integrated P ortfolio (HP OSIP) comprises a range of products and services designed to v erify that customers can successfully realize the cost and feature benefits of adopting open source softw are in their IT environments. HP Open Source foundation components include the base components of an open source-based ecosystem. HP serv ers and storage are v alidated to run the Linux operating system together with the supported commercial L
Resumo do conteúdo contido na página número 10
T y pogr a phi c C o n v e n ti o ns This document uses the following typographical conv entions. A command name or qualified command phrase. Command ComputerOut T ext display ed by the computer . Ctrl-x A key sequence. A sequence such asCtrl-x indicates that y ou must hold down the key labeledCtrl while y ou press another key or button. ENVIRONVAR The name of an environment v ariable, for example,PATH. [ERRORNAME] The name of an error , usually returned in theerrno v ariable. Key The name of a
Resumo do conteúdo contido na página número 11
HP Ope n S o ur ce W eb S e r v e r M i ddle w ar e S t ac k The following components comprise the HP OSMS W eb Serv er Middlew are Stack: Apache W eb Serv er The Apache W eb Serv er is a mature open source w eb serv er that has become the de facto standard because of its high adoption rate on the Internet. Apache T omcat Apache T omcat (or T omcat) is a J2EE servlet and Jav a™ Serv er P ages ( JSP) engine for dev eloping and deploying w eb applications. It also includes other features, such as
Resumo do conteúdo contido na página número 12
F igur e 1 W eb Ser v er S tac k Ar c hitec tur e T able 1 lists the softw are used to test the configurations described in this blueprint. T abl e 1 So f t w ar e T est Conf igur ation So f t w ar e P ac k ag e P ac k ag e N am e Distr ibut or W ebsite L ink V ersion Apache httpd 2.2.0-21.2 apache2.2.0-21.2.x86_64.rpm Nov ell Apache httpd w ebsite Apache 5.5.20 apache-tomcat-5.5.20.tar.gz Apache Apache T omcat T omcat w ebsite Hibernate 3.2.1 hibernate-3.2.1.tar.gz Hibernate Hibernate w ebsite
Resumo do conteúdo contido na página número 13
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 serv ers with database files on Modular Smart Array (MSA) 1000 storage. All other softw are listed in T able 1 are installed on HP ProLiant serv ers, as display ed in Figure 2. F igur e 2 W eb Ser v er H ar d w ar e En v ir onm ent Figure 2 shows a basic configuration consisting of multiple nodes of an Apache W eb S
Resumo do conteúdo contido na página número 14
2. Under thePrimaryFunctions heading, selectWebandLAMPServer and under the Development heading, selectC/C++CompilerandTools as display ed in Figure 3. F igur e 3 Y aS T So f t w ar e Sel ec tion and S y stem T asks 3. Select theDetails button to display a table with the detailed softw are package selections. 4. From theFilter options drop-down list, selectPackageGroups . 5. In thePackageGroups pane, expand theDevelopment group and selectLanguages from the expanded list. V erify that the perl and
Resumo do conteúdo contido na página número 15
# 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. NO TE: By default, the installation enables theiptables firew all, which prev ents external systems from accessing ports below 1024. See “ Appendix B: Frequently Asked Questions” (page 53) and v erify the firew all is disabled or the appropriate rules are set to allow
Resumo do conteúdo contido na página número 16
1. Download the Sun JDK package from the Jav a w ebsite and install as follows (see T able 1 (page 12) for the correct v ersion and w ebsite link): Change to the Sun JDK install package directory , as appropriate for y our system, and install the package by entering the following command: # chmod 755 jdk-1_5_0_10-linux-amd64-rpm.bin #./jdk-1_5_0_10-linux-amd64-rpm.bin 2. Create a symbolic link for Sun JDK by entering the following: # ln -s /usr/java/jdk1.5.0_10 /usr/local/jdk 3. TheJAVA_HOME env
Resumo do conteúdo contido na página número 17
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.5.0_10-b03) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_10-b03, mixed mode) Ins t alling and C o nf i gur ing T o mcat The following procedure provides the steps for installing and configuring T omcat. NO T
Resumo do conteúdo contido na página número 18
NO TE: If theiptables firew all is enabled, y ou 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.sh The following messages appear: Using CATALINA_BASE: /usr/local/apache-tomcat Using CATALINA_HOME: /usr/local/apache-tomcat Using CATALINA_TMPDIR: /usr/local/apache-tomcat/temp Using JRE_HOME: /usr/local/jdk A d v anced A pac he HT TP S e r v e r F eatur e s The follo
Resumo do conteúdo contido na página número 19
Y ou can force a heavier load on the Apache HTTP Serv er 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. NO TE: If y ou encounter the following error: socket: Too many open files (24) Y ou can correct the error by entering the following: # ulimit -n This command increases the limit on the number of open files only for the current shell session. The increased limit is applicabl
Resumo do conteúdo contido na página número 20
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 tw o lines exist , then the tw o modules hav e loaded successfully . Use the following procedure to v erify the serv er status and display the serv er information w eb page: 1. V erify the serv er status by opening a browser and entering the following URL: