1.apache安装
./configure -with-layout=Apache2 -prefix /data2/aimc4_tj/apache-2.2.17 -enable-so
make
make install
2.tomcat-connectors 安装
cd native
./buildconf.sh
chmod 755 configure
./configure --with-apxs=/data2/aimc4_tj/apache-2.2.17/bin/apxs
make
make install
安装后,保证apache/modules 下有so mod_jk.so
3.安装tomcat ,好像是解压就可以了
4.配置apache
4.1.httpd.conf
增加
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkShmFile logs/jk-runtime-status
JkLogLevel info
JkMountfile conf/uriworkermap.properties
JkMountCopy All
JkMount jkstatus
Order deny,allow
AuthType Basic
AuthName "jkstatus"
AuthUserFile conf/jkpasswd
require valid-user
4.2 新建workers.properties
# list the workers by name
worker.list=loadbalancer, status
# localhost server 1
#
worker.worker1.port=18009
worker.worker1.host=10.3.3.151
worker.worker1.type=ajp13
#worker.worker2.stopped=1
# localhost server 2
#
worker.worker2.port=18009
worker.worker2.host=10.3.3.154
worker.worker2.type=ajp13
#worker.worker2.stopped=1
worker.loadbalancer.type=lb
worker.retries=3
worker.loadbalancer.balanced_workers=worker1,worker2
worker.loadbalancer.sticky_session=0
worker.status.type=status
4.3.新建uriworkermap.properties
/*=loadbalancer
#所有请求均有tomcat处理
5.配置tomcat
server.xml
屏蔽
connectionTimeout="20000"
redirectPort="8443" />
修改注意端口和4.2对应
修改
为,注意和4.2对应
阅读(1943) | 评论(0) | 转发(0) |