LINUX Tomcat 5.0.20 and Apache 2 Installation / Integration / Configuration
Write in front official website http://jakarta.apache.org/tomcat/connectors-doc/2004/11/15/ announced no longer continued to develop JK2. The reason is that the installation of JK2 is complex and difficult to cause developers' interest. (Author Note: Note not to say that JK2 has any fatal vulnerability, JK2 or can be used) future httpd2.1 will integrate into new proxy_ajp and will develop new proxy_balancer to load balance.
Either we wait quietly, or just look at the following documentation for JK2 configuration
Reference Tomcat5.0.20 Apache2.0.47 JK2 for Linux Settings [Essence] http://www.javaworld.com.tw/jute/post/view?bid=9&pg=48815&tpg=3&pg=1&sty=1&age=0#48815
<< JSP Technical Manual >>
Official website http://jakarta.apache.org/tomcat/connectors-doc/
[SOLVED] APACHE TOMCAT integration problem http://www.matrix.org.cn/forum_view.asp?forum_id=17&view_id=12656
Talk about my understanding of the integration of Apache Tomcat JK2 http://www.kehui.net/html/Article/23/23791.html
The key reference is the first three items.
The required package httpd-2.0.52.tar.gzjakarta-tomcat-5.5.7.tar.gz JDK-1_5_0_01-linux-i586.binjakarta-Tomcat-Connectors-jk2-src-current.tar.tar (Author Note: Version is 2.0.2) libtool-1.5.tar.gz (I am not used in some Linux environment. See << JSP Technical Manual >>)
Installation process
Install JDK This situation, see JDK installation under Linux and its environment variables http://blog.9cbs.net/sswt/archive/2004/08/19/79471.aspx
Install Apache Equity Archive: HTTPD-2.0.52.tar.gz Execution Action: Unzip - TAR XVFZ HTTPD-2.0.47.tar.gz Installation
CD httpd-2.0.47./configure --prefix = / usr / local / apache --enable-so (author Note: prefix refers to the path to apache installation, default is / usr / local / apache) (Author Note: Enable Here, the key file corresponding to the later needs mod_jk2.so) makemake install
Set - Modify httpd.conf to find Listen 80 to Listen
After finding DirectoryIndex, add index.jsp finds adddefaultcharset xxx at the forefront to add its Mark, make it fail (this setting can be self-setting, I use UTF-8)
Install Tomcat Essentials: Jakarta-Tomcat-5.0.20.tar.gz Execution Action: Unzip - TAR XVFZ JAKARTA-TOMCAT-5.0.20.Tar.gz Installation
MV Jakarta-Tomcat-5.0.20 / usr / local / ln -s /usr/local/jakarta-tomcat-5.0.20 / usr / local / tomcat Open /usr/local/tomcat/bin/catalina.sh overcast Add java_home = / usr / local / java / catalina_home = "/ usr / local / tomcat /" Install JK2 Connector [Key] Screen: JAKARTA-TOMCAT-Connectors-JK2-src.tar.gz Execution Action: Unzip - TOAR XVFZ JAKARTA-TOMCAT-Connectors-jk2-src.tar.gz installation
CD JAKARTA-TOMCAT-Connectors-JK2 / JK / Native2. / Buildconf.sh. / Configure --with-apxs2 = / usr / local / apache / bin / apxsmakecp jk / build / jk2 / apache2 / mod_jk2.so / usr / Local / Apache / MODULES
Setting [Key] In the Apache directory, the CONF folder setting httpd.conf is added to loadModule jk2_module modules / mod_jk2.so In httpd.conf, find DocumentRoot to change later to "/ usr / local / tomcat / webApps /" (this action Personal will decide)
[Key] Copy / Jakarta-Tomcat-Connectors-jk2-2.0.2-src/jk/conf/Workers2.properties to / Apache / Conf / Under
[Key] Modify file vi /usr/local/apache/conf/Workers2.Properties In the final plus an application directory pointing to Tomcat / WebApp /, for example
# Map the Tomcat Examples WebApp To The Web Server Uri Space [URI: / JSP-EXAMPLES / *] INFO = MAP The Whole WebApp
[Key] Modify file vi /usr/local/tomcat/conf/jk2.properties
# List of neededed handlers.handler.list = channel, request # Override the default port for the channel.PhannelSocketchannelsocket.port = 8009
[Key] Modify file vi /tomcat/conf/server.xml
Cancellize this paragraph
<-!
Make sure this paragraph is not canceled
Set the environment variable vi / etc / profile Last plus
export JAVA_HOME = / usr / local / javaexport PATH = $ PATH: $ JAVA_HOME / bin: $ JAVA_HOME / jreexport CLASSPATH = $ JAVA_HOME / lib: $ JAVA_HOME / lib / tools.jarexport CATALINA_HOME = / usr / local / tomcatexport CATALINA_BASE = / usr / local / Tomcat
(Author Note: I only added export catalina_home = / usr / local / tomcat, Java's original)
Start, close, test
Start / Tomcat/bin/catalina.sh Start / Apache / Bin / Apachectl Start
Turn off / Tomcat/bin/catalina.sh stop / apache / bin / apachectl stop
Test http://202.108.39.179/jsp-examples/ If Tomcat's JSP-EXAMPLES / page appears, it is successful.
If there is a problem, don't be discouraged, I have experienced a hard land, welcome to discuss SSWT@163.com