欢迎来到天天文库
浏览记录
ID:10034344
大小:251.51 KB
页数:14页
时间:2018-05-12
《第八组tomcat群集实现负载均衡》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、TOMCAT群集实现负载均衡第八组1.环境介绍操作系统环境:windowsxpsp2(一台机器上跑2个或多个tomcat服务)Java环境:jdk1.6.0_13软件:apache_2.2.13-win32-x86-no_ssl.msiapache-tomcat-6.0.20.zip2.实验方案配置jdk环境变量下载并安装Apache和tomcat配置Apache和tomcat编写jsp测试文件运行Apache和tomcat测试jsp文件关闭其中一个tomcat服务,再测试jsp文件3.实现过程Apache的配置:打开
2、conf/httpd.conf把这个模块的注释去掉LoadModuleproxy_modulemodules/mod_proxy.soLoadModuleproxy_connect_modulemodules/mod_proxy_connect.soLoadModuleproxy_ftp_modulemodules/mod_proxy_ftp.soLoadModuleproxy_http_modulemodules/mod_proxy_http.soLoadModuleproxy_ajp_modulemodul
3、es/mod_proxy_ajp.soLoadModuleproxy_balancer_modulemodules/mod_proxy_balancer.so再找到加上index.jsp修改成DirectoryIndexindex.htmlindex.jsp在配置文件的末尾加上:ProxyRequestsOffProxyPass/balancer://myclusterstickysession
4、=jsessionidnofailover=OnBalancerMemberhttp://127.0.0.1:9080BalancerMemberhttp://127.0.0.1:10080SetHandlerbalancer-managerOrderDeny,AllowDenyfromallAllowfromallSetHan
5、dlerserver-statusOrderDeny,AllowDenyfromallAllowfromall3.实现过程3.实现过程Tomcat1的配置:6、rt="8443"/>3.实现过程添加在之间7、.apache.catalina.ha.session.BackupManager"expireSessionsOnShutdown="false"notifyListenersOnReplication="true"mapSendOptions="6"/>8、rvice"address="224.0.0.1"port="45564"frequency="500"dropTime="3000"/>
6、rt="8443"/>3.实现过程添加在之间7、.apache.catalina.ha.session.BackupManager"expireSessionsOnShutdown="false"notifyListenersOnReplication="true"mapSendOptions="6"/>8、rvice"address="224.0.0.1"port="45564"frequency="500"dropTime="3000"/>
7、.apache.catalina.ha.session.BackupManager"expireSessionsOnShutdown="false"notifyListenersOnReplication="true"mapSendOptions="6"/>8、rvice"address="224.0.0.1"port="45564"frequency="500"dropTime="3000"/>
8、rvice"address="224.0.0.1"port="45564"frequency="500"dropTime="3000"/>
此文档下载收益归作者所有