Install Redhat Enterprise As3 HTTPD-2.0.52 Tomcat-4.1.31 MOD_JK2 Steps
Reference article: http://www.chinaunix.net/jh/13/433971.html
The required installation package (Latest version): J2SDK-1_4_1_07-Linux-i586-rpm.binhttpd-2.0.52.tar.gz jakarta-tomcat-4.1.31.tar.gz jakarta-Tomcat-Connectors-4.1.31-SRC .tar.gz
Installation Directory: J2SDK -> / usr / java / j2sdk apache -> / usr / local / apache2 Tomcat -> / usr / local / tomcat4
1. Install J2SDK1.4.2, Tomcat's run requires J2SDK support.
Download address: http://java.sun.com/j2se/1.4.2/download.htmlchmod 755 J2SDK-1_4_1_07-linux-i586-rpm.bin./j2sdk-1_4_1_07-linux-i586-rpm.binrpm -ivh J2SDK -1_4_1_07-linux-i586-rpm
2. Set the environment variable, Java's run needs to set the environment variable.
Export java_home = / usr / java / j2sdk1.4.1_07export classpath =.: $ java_home / lib: $ java_home / jre / lib: $ java_home / jre: /usr/local/tomcat4/common/lib/servlet.jarexport Path = $ PATH: /USR/JAVA/J2SDK1.4.1_07/binexport catalina_home = / usr / local / tomcat4
Restart the system, if you want to take effect immediately, execute the statements on the upper side of the SHELL. Enter Java -Version to see version information, that is, the installation J2SDK is successful.
3. Install AAPACHE. Must be compiled into a way to dynamically load modules, that is, when configure is appropriate, it is necessary to add theNable-module = SO option to load the MOD_JK2.SO.
Wget http://apache.intissite.com/httpd/httpd-2.0.52.tar.gz tar zxvf httpd-2.0.52.tar.gz ./configure --prefix = / usr / local / apache2 --enable- Module = Somake Make Install
4. Install Tomcat, the simplest is to download the binary version, directly tar -xzvf jakarta-tomcat-4.1.2.tar.gz.
Download address: http://jakarta.apache.org/site/binindex.cgi
TOAR ZXVF JAKARTA-TOMCAT-4.1.31.TAR.GZ cp -r jakarta-tomcat-4.1.31 / usr / local / tomcat4
Test whether Tomcat is normal: Start Tomcat Service: /usr/local/tomcat4/bin/startup.sh Access http: // ip: 8080 Whether you see Tomcat Page Off: /usr/local/tomcat/bin/shutdown.sh
5.Tomcat-Connectors is used to integrate Apache and Tomcat, compile generation of MOD_JK2.SO modules, and after the Apache loads, it will be forwarded to Tomcat.
Download address: http://apache.osuosl.org/jakarta/tomcat-connectors/jk2/tar zxvf jakarta-tomcat-connectors-4.1.31-src.tar.gzcd Jakarta-Tomcat-Connectors-4.1.31-SRCCD JK / native2./configure --with-apxs2 = / usr / local / apache2 / bin / apxs make
If you don't have problems: cd ../build/jk2/apache2/ This will have a mod_jk2.so, copy to / usr / local / apache2 / modules directory. CP MOD_JK2.SO / USR / local / apache2 / modules /
6. Configuration:
Modify /usr/local/apache2/conf/httpd.conf
Change DocumentRoot "/ usr / local / apache2 / htdocs" to: documentroot "/ usr / local / tomcat4 / webapps / root"
Turn #
And add index.jsp.jsp.html index index.html index.html.var
Add the following below the endmodule jk2_module modules / mod_jk2.so at the end of httpd.conf
############################################################ > Jkworkersfile /usr/local/apache2/conf/workers2.properties jklogfile /var/log/httpd/mod_jk.log jkloglevel error ifmodule>
####################################### or: # vi /usr/local/tomcat4/conf/jk2.properties
Handler.list = APR, CHANELSOCKET, Request, ShmchannelSocket.Port = 8009 ############################################################################################################################################################################################################################################################# ########## Create /usr/local/apache2/conf/Workers2.properties, the content is as follows: [Logger] level = Error
[config:] file = / usr / local / apache2 / conf / workers2.properties debug = 0 Debugenv = 0
# Alnate file logger [logger.file] # level = debug level = error file = / var / log / httpd / jk2.log
[Shm:]. Info = Scoreboard Required for reconfiguration and status with multiprocess servers file = / var / log / httpd / jk2.shm size = 1048576 debug = 0 disabled = 0 [channel.socket: localhost: 8009] info = Ajp13 forwarding Over socket debug = 0 Tomcatid = localhost: 8009 KeePalive = 1
[AJP13: localhost: 8009] Channel = CHANNEL.SOCKET: Localhost: 8009 Debug = 0
[status:] info = status worker, displays runtime informations
[URI: / JKSTATUS / *] INFO = Display Status Information and Checks the config file for changes. Worker = ajp13: localhost: 8009
[URI: / *. jsp] worker = ajp13: localhost: 8009 context = / ######################################## ########### [URI: / *. Jsp] worker = ajp13: localhost: 8009
[Uri: / Examples / *] Worker = ajp13: localhost: 8009` [URI: / Admin / *] worker = ajp13: localhost: 8009
[URI: / Admin / Servlet / *] Worker = ajp13: localhost: 8009
[URI: / Tomcat-DOCS / *] Worker = ajp13: localhost: 8009
[URI: / manager / *] worker = ajp13: localhost: 8009
[URI: / WebDAV / *] Worker = AJP13: Localhost: 8009
[URI: / WWW / *] worker = ajp13: localhost: 8009 ####################################################################################################################################################################################################################### #############
7. Test: Create Test.jsp in / VAR / WWW / HTML / Create: <% @ page import = "java.util. *, Java.sql. *, Java.text. *" ContentType = "Text / HTML; Charset = GB2312 "%> <% out.println (" test page ");%> Access http: //ip/test.jsp, the content is normal, and the Connector is normal.
The configuration is all completed.