AS5 comes with Tomcat 5, which is very convenient. We recommend that you run all the RPM packages cp and install them with YUM. This is not the focus of this article. it is very convenient to install Tomcat in AS5. Apache uses the RPM package for installation.
1. Download mod_jk
Current mod_jk connector stable version is 1.2.23, use a Web browser to access http://www.apache.org/dist/tomca... es/linux/jk-1.2.23/, download mod_jk-1.2.23-apache-2.2.x-linux-i686.so.
2. install and configure mod_jk
Mv mod_jk-1.2.23-apache-2.2.x-linux-i686.so/etc/httpd/modules/mod_jk.so
Create a subdirectory jk in the/usr/share/tomcat5/conf directory, and create the file works. properties. The content is as follows:
Workers. tomcat_home =/usr/share/tomcat5workers. java_home =/us/lib/jvm/javaps =/worker. list = ajp13worker. ajp13.port = 8009worker. ajp13.host = 127.0.0.1worker.ajp13.type = ajp13worker. ajp13.lbfactor = 1vi/usr/share/tomcat5/conf/server. xml, add it under the statement
|
Restart Tomcat 5
Cp/usr/share/tomcat5/conf/auto/mod_jk.conf/usr/share/tomcat5/conf/jk
Mv/usr/share/tomcat5/conf/jk/mod_jk.conf/usr/share/tomcat5/conf/jk/mod_jk.conf-auto
Vi/usr/share/tomcat5/conf/mod_jk.conf-auto, change the content of this file as follows:
LoadModules jk_module "/etc/httpd/modules/mod_jk.so"
JkWorkersFile "/usr/share/tomcat5/conf/jk/workers. properties"
JkLogFile "/usr/share/tomcat5/logs/mod_jk.log"
JkLogLevel emerg
ServerNmae localhost
JkMount/*. jsp ajp13
3. Configure Tomcat vi/usr/share/tomcat5/conf/server. xml
Add the following statement after xmlValidation = "false" xmlNamespaceAware = "false">:
4. Configure Apache vi/etc/httpd/conf/httpd. conf
Add the following statement to the last line:
Include/usr/share/tomcat5/conf/jk/mod_jk.conf-auto
5. Restart the Apache service and Tomcat service.
6. Test the integration of Apache and Tomcat.
Vi/var/www/html/test. jsp
Hello! The time is