1. 安装httpd
yum install httpd-2.2.3
rpm -q httpd
2. 增加module:mod_jk.so
wget http://archive.apache.org/dist/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.23/mod_jk-1.2.23-apache-2.2.x-linux-x86_64.so
mv mod_jk-1.2.23-apache-2.2.x-linux-x86_64.so mod_jk.so
mv mod_jk.so /usr/lib64/httpd/modules/mod_jk.so
3. 修改httpd.conf
sed -i '$a include /etc/httpd/conf/mod_jk.conf' /etc/httpd/conf/httpd.conf
4. 增加mod_jk.conf
# Load mod_jk module
LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile /etc/httpd/conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# JkOptions indicate to send SSL KEY SIZE.
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Send servlet for context /examples to worker named ajp13
# JkMount /servlet/* ajp13
# Send JSPs for context /examples to worker named ajp13
JkMount /searcher/* searcher
JkMount /jkmanager/* jkstatus
5. 增加workers.properties
###========worker.list========
worker.list=searcher,jkstatus
###========searcher========
worker.searcher.type=lb
worker.searcher.method=B
worker.searcher.balance_workers=searcher1,searcher2,searcher3
# *..* sticky_session=1.......sticky_session_force=1, .........worker..
worker.searcher.sticky_session=1
worker.searcher.sticky_session_force=0
worker.searcher1.port=8009
worker.searcher1.host=192.168.1.231
worker.searcher1.type=ajp13
worker.searcher1.lbfactor=1
worker.searcher2.port=8009
worker.searcher2.host=192.168.1.232
worker.searcher2.type=ajp13
worker.searcher2.lbfactor=1
worker.searcher3.port=8009
worker.searcher3.host=192.168.1.233
worker.searcher3.type=ajp13
worker.searcher3.lbfactor=1
###=======jkstatus==========
worker.jkstatus.type=status
<Location /jkmanager/>
JkMount jkstatus
Order deny,allow
Deny from all
Allow from all
</Location>
6. 启动httpd
/usr/sbin/httpd -k start
7. 通过http://$host/jkmanager查看apache状态
分享到:
相关推荐
php环境搭建。apache安装,mysql安装,整合安装的过程,安装步骤。
centos6.4搭建apache+mysql+php环境.docx
CentOS5.3搭建Apache2.2.4+Mysql5.1.4+PHP5.3服务器.pdf
centos7配置APache+PHP+mysql[归纳].pdf
NULL 博文链接:https://liulijun-cn-2011.iteye.com/blog/2031654
CentOS 5.5 yum 搭建 Apache+PHP5+MySQL
最近要搭建一个阿里云的LMAP环境,选了CentOS7来做搭建。下面通过本文给大家分享阿里云CentOS7搭建Apache+PHP+MySQL环境,感兴趣的朋友一起看看吧
CentOS 6.2 服务器下搭建Apache+SVN
centosApache搭建多个站点方法.pdf
Centos7以上版本搭建Apache+PHP+Mysql+PhpMyAdmin环境搭建.pdf
详细介绍了在CentOS 系统下进行 PHP+APACHE+Mysql 环境的搭建,供大家一起参考学习,有问题欢迎留言交流,谢谢。
CentOS 5.5 Apache PHP5MySQL yum安装Web服务器
Centos7以上版本搭建Apache+PHP+Mysql+PhpMyAdmin环境搭建.doc
本文档想洗介绍了在linux操作系统下 Centos7 搭建 PHP7.2 + Apache 2.4 + mariadb 10.2