<!--[if !supportLists]-->1. <!--[endif]-->安装java环境
# ./jdk-1_5_0_18-linux-i586-rpm.bin
# vim /etc/profile
export JAVA_HOME="/usr/java/jdk1.5.0_18/"
export CLASS_PATH="/usr/java/jdk1.5.0_18/lib:/usr/java/jdk1.5.0_18/jre/lib/"
pathmunge /usr/java/jdk1.5.0_18/bin:/usr/java/jdk1.5.0_18/jre/bin
<!--[if !supportLists]-->2. <!--[endif]-->安装jk
# cd /root/jakarta-tomcat-connectors-1.2.15-src/jk/native
# ./configure --with-apxs=/usr/local/apache2/bin/apxs
# make
# make install
# cp /usr/local/apache2/modules/mod_jk.so /etc/httpd/modules/
<!--[if !supportLists]-->3. <!--[endif]-->创建workers.properties文件
# vim /etc/httpd/conf/workers.properties
worker.list=worker1
worker.worker1.port=8009 #工作端口,若没占用则不用修改
worker.worker1.host=localhost #Tomcat服务器的地址
worker.worker1.type=ajp13 #类型
worker.worker1.lbfactor=1 #负载平衡因数
<!--[if !supportLists]-->4. <!--[endif]-->修改Apache服务器的配置文件httpd.conf
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel debug
JkMount /*.jsp worker1
JkMount /helloapp/* worker1
<!--[if !supportLists]-->5. <!--[endif]-->启动tomcat
# /usr/local/tomcat/bin/startup.sh
<!--[if !supportLists]-->6. <!--[endif]-->测试
# cp -r helloapp/ /usr/local/tomcat/webapps/
http://localhost/helloapp/index.html