forked from obullxl/obullxl.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtopic-blog-17.html
176 lines (147 loc) · 29.4 KB
/
topic-blog-17.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>最新 Java/Node.js/Spring/MySQL/数据库 技术博客 - 做最好的Java,Node.js,Bootstrap,DWZ,Git,GitHub,阿里云 技术交流开发博客</title>
<meta name="description" content="Java编程,Node.js Bootstrap Node Spring SpringMVC Struts1 Struts2 Webwork框架深入,Freemarker Velocity模板使用,XMLHTTP Ajax开发,Java Web开发,Java企业应用,Java设计模式,Java开源框架,Java应用服务器,Rich Client讨论,Ruby编程,Ruby DSL开发,Ruby on rails实践,JavaScript编程,敏捷软件开发XP TDD,软件配置管理,软件测试,项目管理UML,数据库,C#/.net C/C++ Erlang/FP PHP/Linux平台,精通Hibernate" />
<meta name="keywords" content="Java编程 Node.js框架 Spring框架 Ajax技术 agile敏捷软件开发 ruby on rails实践 ITeye深度技术社区" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="http://anode.aliapp.com/favicon.png" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic" />
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Arizonia" />
<link rel="stylesheet" type="text/css" href="http://obullxl.github.io/public/css/bootstrap.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://obullxl.github.io/public/css/bootstrap-responsive.css" />
<link rel="stylesheet" type="text/css" href="http://obullxl.github.io/public/css/atom-front.css" />
<script type="text/javascript" charset="utf-8" src="http://obullxl.github.io/public/js/jquery-2.0.3.js"></script>
<script type="text/javascript" charset="utf-8" src="http://obullxl.github.io/public/js/bootstrap.js"></script>
<!--[if lt IE 9]>
<script type="text/javascript" charset="utf-8" src="http://obullxl.github.io/public/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">Menu</a>
<div class="nav-collapse">
<ul class="nav">
<li><a href="./index.html">首页</a></li>
<li class="active"><a href="./index-blog.html">博客</a></li>
<li><a href="./index-news.html">资讯</a></li>
<li><a href="./index-album.html">图片</a></li>
</ul>
<ul class="nav pull-right">
<li><a href="./index-about.html">关于</a></li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
</div>
</div>
<!-- /.navbar -->
<style type="text/css">
.radius-block:after {
content: "发表评论";
}
</style>
<div class="blog">
<div class="container">
<div class="row">
<div class="span8">
<div class="entry-ads">
<script type="text/javascript">
<!--
google_ad_client = "ca-pub-2548953017344039";
/* GitIO列表1-728W */
google_ad_slot = "5847202679";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<div class="entry">
<h2>Apache与Tomcat集群配置 - 老牛啊</h2>
<p class="meta">
<i class="icon-calendar"></i> 2013-09-05
- <i class="icon-user"></i> 老牛啊
</p>
<p>PS:今天整理硬盘,发现这个有用的收藏,与大家分享!一、环境说明WindowsXPapache_2.0.59-win32-x86-no_ssl.msihttp://httpd.apache.org/mod_jk-apache-2.0.59.sohttp://tomcat.apache.org/download-connectors.cgiapache-tomcat-5.5.23.zip http://tomcat.apache.org/downl</p>
<p>
PS:今天整理硬盘,发现这个有用的收藏,与大家分享!<span style="font-family: 宋体;" face="宋体"> </span><div class="Section0"><p class="p0"> </p><p class="p0">一、 环境说明</p><p class="p0">Windows XP</p><p class="p0">apache_2.0.59-win32-x86-no_ssl.msi <a href="http://httpd.apache.org/">http://httpd.apache.org/</a></p><p class="p0">mod_jk-apache-2.0.59.so <a href="http://tomcat.apache.org/download-connectors.cgi">http://tomcat.apache.org/download-connectors.cgi</a></p><p class="p0">apache-tomcat-5.5.23.zip <a href="http://tomcat.apache.org/download-55.cgi">http://tomcat.apache.org/download-55.cgi</a></p><p class="p0"> </p><p class="p0">我的程序分别安装到</p><p class="p0">D:\webserver\Apache Group\Apache2</p><p class="p0">D:\webserver\TomcatCluster\tomcat1</p><p class="p0">D:\webserver\TomcatCluster\tomcat2</p><p class="p0"> </p><p class="p0">Apache<span style="font-family: 宋体;" face="宋体">安装完后,在右下角状态栏中可以看到 </span><span style="font-family: Times New Roman;" face="Times New Roman">Apache Service Monitor </span><span style="font-family: 宋体;" face="宋体">可以控制</span><span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">的状态。 </span></p><p class="p0">验证<span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">是否安装成功,可以访问</span><a href="http://localhost/">http://localhost</a> 如果能看到<span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">的预制页面,说明安装成功,如果不行,可以访问</span><a href="http://localhost:8080/">http://localhost:8080</a> 试试(可能因为<span style="font-family: Times New Roman;" face="Times New Roman">IIS</span><span style="font-family: 宋体;" face="宋体">已经使用了</span><span style="font-family: Times New Roman;" face="Times New Roman">80</span><span style="font-family: 宋体;" face="宋体">端口</span><span style="font-family: Times New Roman;" face="Times New Roman">, </span><span style="font-family: 宋体;" face="宋体">我的就是</span><span style="font-family: Times New Roman;" face="Times New Roman">8080, </span><span style="font-family: 宋体;" face="宋体">可以修改</span><span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">的配置文件来修改)</span></p><p class="p0"> </p><p class="p0">二、 负载均衡</p><p class="p0">找到<span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">安装目录下</span>conf目录中的httpd.conf文件。</p><p class="p0">在文件最后添加一句:</p><p class="p0">include "D:\webserver\Apache Group\Apache2\conf\mod_jk.conf"</p><p class="p0"> </p><p class="p0">接着在<span style="font-family: Times New Roman;" face="Times New Roman">conf</span><span style="font-family: 宋体;" face="宋体">目录中新建文件</span>mod_jk.conf并添加下面的内容:</p><p class="p0">#<span style="font-family: 宋体;" face="宋体">加载</span><span style="font-family: Times New Roman;" face="Times New Roman">mod_jk Module</span></p><p class="p0">LoadModule jk_module modules/mod_jk-apache-2.0.59.so</p><p class="p0">#<span style="font-family: 宋体;" face="宋体">指定 </span><span style="font-family: Times New Roman;" face="Times New Roman">workers.properties</span><span style="font-family: 宋体;" face="宋体">文件路径</span></p><p class="p0">JkWorkersFile conf/workers.properties</p><p class="p0">#<span style="font-family: 宋体;" face="宋体">指定哪些请求交给</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">处理</span><span style="font-family: Times New Roman;" face="Times New Roman">,"controller"</span><span style="font-family: 宋体;" face="宋体">为在</span><span style="font-family: Times New Roman;" face="Times New Roman">workers.propertise</span><span style="font-family: 宋体;" face="宋体">里指定的负载分配控制器名</span></p><p class="p0">JkMount /*.jsp controller</p><p class="p0"> </p><p class="p0">在<span style="font-family: Times New Roman;" face="Times New Roman">conf</span><span style="font-family: 宋体;" face="宋体">目录下新建</span>workers.properties文件并添加如下内容:</p><p class="p0">#server</p><p class="p0">worker.list = controller</p><p class="p0">#========tomcat1========</p><p class="p0">worker.tomcat1.port=11009</p><p class="p0">worker.tomcat1.host=localhost</p><p class="p0">worker.tomcat1.type=ajp13</p><p class="p0">worker.tomcat1.lbfactor = 1</p><p class="p0">#========tomcat2========</p><p class="p0">worker.tomcat2.port=12009</p><p class="p0">worker.tomcat2.host=localhost</p><p class="p0">worker.tomcat2.type=ajp13</p><p class="p0">worker.tomcat2.lbfactor = 1</p><p class="p0"> </p><p class="p0">#========controller,<span style="font-family: 宋体;" face="宋体">负载均衡控制器</span><span style="font-family: Times New Roman;" face="Times New Roman">========</span></p><p class="p0">worker.controller.type=lb</p><p class="p0">worker.controller.balanced_workers=tomcat1,tomcat2</p><p class="p0">worker.controller.sticky_session=1</p><p class="p0"> </p><p class="p0">(解释一下<span style="font-family: Times New Roman;" face="Times New Roman">AJP13</span><span style="font-family: 宋体;" face="宋体">是 </span>Apache JServ Protocol version 1.3)</p><p class="p0"> </p><p class="p0">将mod_jk-apache-2.0.59.so 复制到<span style="font-family: Times New Roman;" face="Times New Roman">Apache</span><span style="font-family: 宋体;" face="宋体">的</span>modules目录中。</p><p class="p0"> </p><p class="p0">接下来配置<span style="font-family: Times New Roman;" face="Times New Roman">2</span><span style="font-family: 宋体;" face="宋体">个</span><span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span></p><p class="p0">打开tomcat1\conf\ server.xml</p><p class="p0">将Server port 改为11005</p><p class="p0"><Server port="11005" shutdown="SHUTDOWN"></p><p class="p0"> </p><p class="p0">将Define Connector port改为11080</p><p class="p0"><Connector port="11080" maxHttpHeaderSize="8192"</p><p class="p0"> </p><p class="p0">将<span style="font-family: Times New Roman;" face="Times New Roman">AJP13 </span>Connector port改为11009</p><p class="p0"><Connector port="11009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /></p><p class="p0"> </p><p class="p0">打开tomcat2\conf\server.xml</p><p class="p0">将Server port 改为12005</p><p class="p0"><Server port="12005" shutdown="SHUTDOWN"></p><p class="p0"> </p><p class="p0">将Define Connector port改为12080</p><p class="p0"><Connector port="12080" maxHttpHeaderSize="8192"</p><p class="p0"> </p><p class="p0">将<span style="font-family: Times New Roman;" face="Times New Roman">AJP13 </span>Connector port改为12009</p><p class="p0"><Connector port="12009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /></p><p class="p0"> </p><p class="p0">好了,现在建立一个测试程序</p><p class="p0">分别在两个<span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span><span style="font-family: 宋体;" face="宋体">的</span>webapps中建立test目录,并新建test.jsp文件,内容如下:</p><p class="p0"><%</p><p class="p0">System.out.println("===========");</p><p class="p0">%></p><p class="p0"> </p><p class="p0">启动<span style="font-family: Times New Roman;" face="Times New Roman">apache, tomcat1, tomcat2</span></p><p class="p0">访问<a href="http://localhost:8080/test/test.jsp">http://localhost:8080/test/test.jsp</a> (或者 http://localhost/test/test.jsp)不断刷新页面,可以在两个<span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span><span style="font-family: 宋体;" face="宋体">的控制台中看到,交替输出</span>"===========", <span style="font-family: 宋体;" face="宋体">这样就实现了负载均衡。</span></p><p class="p0"> </p><p class="p0">三、 集群配置</p><p class="p0">集群除了负载均衡,另一个主要功能是Session Replication。</p><p class="p0">打开tomcat1\conf\ server.xml将<Cluster><span style="font-family: 宋体;" face="宋体">部分的注释去掉。</span></p><p class="p0">再打开tomcat2\conf\ server.xml将<Cluster><span style="font-family: 宋体;" face="宋体">部分的注释也去掉,并将</span><span style="font-family: Times New Roman;" face="Times New Roman"><</span>Cluster><span style="font-family: 宋体;" face="宋体">中</span><span style="font-family: Times New Roman;" face="Times New Roman"><</span>Receiver><span style="font-family: 宋体;" face="宋体">的</span>tcpListenPort的值改为4002。以避免与<span style="font-family: Times New Roman;" face="Times New Roman">Tomcat1</span><span style="font-family: 宋体;" face="宋体">冲突。</span></p><p class="p0"> </p><p class="p0">添加一个新的测试程序<span style="font-family: Times New Roman;" face="Times New Roman">test2.jsp</span></p><p class="p0"><%@ page contentType="text/html; charset=GBK" %></p><p class="p0"><%@ page import="java.util.*" %></p><p class="p0"><html><head><title>Cluster App Test</title></head></p><p class="p0"><body></p><p class="p0">Server Info:</p><p class="p0"><%</p><p class="p0">out.println(request.getLocalAddr() + " : " + request.getLocalPort()+"<br>");%></p><p class="p0"><%</p><p class="p0"> out.println("<br> ID " + session.getId()+"<br>");</p><p class="p0"> // <span style="font-family: 宋体;" face="宋体">如果有新的 </span><span style="font-family: Times New Roman;" face="Times New Roman">Session </span><span style="font-family: 宋体;" face="宋体">属性设置</span></p><p class="p0"> String dataName = request.getParameter("dataName");</p><p class="p0"> if (dataName != null && dataName.length() > 0) {</p><p class="p0"> String dataValue = request.getParameter("dataValue");</p><p class="p0"> session.setAttribute(dataName, dataValue);</p><p class="p0"> }</p><p class="p0"> out.println("<b>Session <span style="font-family: 宋体;" face="宋体">列表</span><span style="font-family: Times New Roman;" face="Times New Roman"></b><br>");</span></p><p class="p0"> System.out.println("============================");</p><p class="p0"> Enumeration e = session.getAttributeNames();</p><p class="p0"> while (e.hasMoreElements()) {</p><p class="p0"> String name = (String)e.nextElement();</p><p class="p0"> String value = session.getAttribute(name).toString();</p><p class="p0"> out.println( name + " = " + value+"<br>");</p><p class="p0"> System.out.println( name + " = " + value);</p><p class="p0"> }</p><p class="p0">%></p><p class="p0"> <form action="test2.jsp" method="POST"></p><p class="p0"> 名称<span style="font-family: Times New Roman;" face="Times New Roman">:<input type=text size=20 name="dataName"></span></p><p class="p0"> <br></p><p class="p0"> 值<span style="font-family: Times New Roman;" face="Times New Roman">:<input type=text size=20 name="dataValue"></span></p><p class="p0"> <br></p><p class="p0"> <input type=submit></p><p class="p0"> </form></p><p class="p0"></body></p><p class="p0"></html></p><p class="p0"> </p><p class="p0">分别在<span style="font-family: Times New Roman;" face="Times New Roman">2</span><span style="font-family: 宋体;" face="宋体">个</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">的</span>webapps\test中新建WEB-INF目录,在WEB-INF中添加web.xml内容如下:</p><p class="p0"><web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"></p><p class="p0"> <display-name>TomcatDemo</display-name></p><p class="p0"> <distributable/></p><p class="p0"></web-app></p><p class="p0"> </p><p class="p0">主要是添加<distributable/>,distributable<span style="font-family: 宋体;" face="宋体">元素</span>用来告诉<span style="font-family: Times New Roman;" face="Times New Roman">servlet</span><span style="font-family: 宋体;" face="宋体">容器,</span>程序将部署在分布式<span style="font-family: Times New Roman;" face="Times New Roman">Web</span><span style="font-family: 宋体;" face="宋体">容器</span>中。</p><p class="p0">重新启动<span style="font-family: Times New Roman;" face="Times New Roman">tomcat1</span><span style="font-family: 宋体;" face="宋体">和</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat2. </span><span style="font-family: 宋体;" face="宋体">访问</span><a href="http://localhost:8080/test/test2.jsp">http://localhost:8080/test/test2.jsp</a> (或<a href="http://localhost/test/test2.jsp">http://localhost/test/test2.jsp</a>)</p><p class="p0">随意添加<span style="font-family: Times New Roman;" face="Times New Roman">key-value, </span><span style="font-family: 宋体;" face="宋体">可以看到两个</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">交替显示</span><span style="font-family: Times New Roman;" face="Times New Roman">session</span><span style="font-family: 宋体;" face="宋体">中的值,各个</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">的</span><span style="font-family: Times New Roman;" face="Times New Roman">session</span><span style="font-family: 宋体;" face="宋体">是同步的。</span></p><p class="p0"> </p><p class="p0">再来修改tomcat1\conf\server.xml,找到</p><p class="p0"><Engine name="Catalina" defaultHost="localhost"></p><p class="p0">为其添加jvmRoute属性,值为<span style="font-family: Times New Roman;" face="Times New Roman">apache</span><span style="font-family: 宋体;" face="宋体">的</span><span style="font-family: Times New Roman;" face="Times New Roman">conf\</span>workers.properties中配置的<span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">名字。</span></p><p class="p0"><Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1"></p><p class="p0"> </p><p class="p0">同样修改tomcat2\conf\server.xml的相同部分</p><p class="p0"><Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2"></p><p class="p0"> </p><p class="p0">jvmRoute<span style="font-family: 宋体;" face="宋体">是</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">路由标示,由此区分两台</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">主机。一次会话,就有一个</span><span style="font-family: Times New Roman;" face="Times New Roman">sessionID</span><span style="font-family: 宋体;" face="宋体">,这个</span><span style="font-family: Times New Roman;" face="Times New Roman">sessionID</span><span style="font-family: 宋体;" face="宋体">后面会跟上</span><span style="font-family: Times New Roman;" face="Times New Roman">jvmRoute</span><span style="font-family: 宋体;" face="宋体">设置的值,这样一次会话,就只会让一个</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat</span><span style="font-family: 宋体;" face="宋体">处理。</span></p><p class="p0"> </p><p class="p0">重新启动<span style="font-family: Times New Roman;" face="Times New Roman">tomcat1, tomcat2</span></p><p class="p0">访问<a href="http://localhost:8080/test/test2.jsp">http://localhost:8080/test/test2.jsp</a> 可以看到session.getId()的值在原<span style="font-family: Times New Roman;" face="Times New Roman">session id</span><span style="font-family: 宋体;" face="宋体">后面多了</span>jvmRoute的值。</p><p class="p0">ID 46A5843FF4A1E0A84338225AC02F6430.tomcat1</p><p class="p0">随意添加<span style="font-family: Times New Roman;" face="Times New Roman">key-value</span><span style="font-family: 宋体;" face="宋体">,可以看到</span><span style="font-family: Times New Roman;" face="Times New Roman">session</span><span style="font-family: 宋体;" face="宋体">信息只在</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat1</span><span style="font-family: 宋体;" face="宋体">中输出。</span></p><p class="p0"> </p><p class="p0">再打开一个浏览器,并访问<a href="http://localhost:8080/test/test2.jsp">http://localhost:8080/test/test2.jsp</a> 其<span style="font-family: Times New Roman;" face="Times New Roman">session id</span><span style="font-family: 宋体;" face="宋体">可能变为</span></p><p class="p0">ID 11478E5BE5FE388E4845205B4133A30F.tomcat2</p><p class="p0">其值也只会在<span style="font-family: Times New Roman;" face="Times New Roman">tomcat2</span><span style="font-family: 宋体;" face="宋体">中输出。</span></p><p class="p0"> </p><p class="p0">现在把<span style="font-family: Times New Roman;" face="Times New Roman">tomcat1</span><span style="font-family: 宋体;" face="宋体">关闭,再次刷新访问</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat1</span><span style="font-family: 宋体;" face="宋体">的那个浏览器,可以看到</span><span style="font-family: Times New Roman;" face="Times New Roman">session</span><span style="font-family: 宋体;" face="宋体">信息输出到了</span><span style="font-family: Times New Roman;" face="Times New Roman">tomcat2</span><span style="font-family: 宋体;" face="宋体">的控制台中,并且</span><span style="font-family: Times New Roman;" face="Times New Roman">session</span><span style="font-family: 宋体;" face="宋体">信息仍然保留着。</span></p><p class="p0"> </p><p class="p0">附件</p><p class="p0">Apache与Tomcat集群配置整个压缩包下载:<a target="_blank" href="http://files.cnblogs.com/obullxl/Tomcat%E9%9B%86%E7%BE%A4%E9%85%8D%E7%BD%AE.rar">Apache+Tomcat集群配置</a></p><p class="p0"> </p><p class="p0">参考文章</p><p class="p0"><a href="http://hi.baidu.com/luodaijun/blog/item/5bbe4cfb5ffef864034f56a1.html">http://hi.baidu.com/luodaijun/blog/item/5bbe4cfb5ffef864034f56a1.html</a></p><p class="p0"><a href="http://www-128.ibm.com/developerworks/cn/java/l-jetspeed/">http://www-128.ibm.com/developerworks/cn/java/l-jetspeed/</a></p><p class="p0"><a href="http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html">http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html</a></p><p class="p0"><a href="http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.html">http://tomcat.apache.org/tomcat-5.0-doc/cluster-howto.html</a></p><p class="p0"><a href="http://hi.baidu.com/abocai/blog/item/c18314f4d8e4a1ef7609d70f.html">http://hi.baidu.com/abocai/blog/item/c18314f4d8e4a1ef7609d70f.html</a></p><p class="p0"><a href="http://hi.baidu.com/injava/blog/item/c8df882f136f21391e30896d.html">http://hi.baidu.com/injava/blog/item/c8df882f136f21391e30896d.html</a></p><p class="p0"> </p><p class="p0">另外推荐一篇文章《Remotely monitor Tomcat clusters using MC4J》,使用<span style="font-family: Times New Roman;" face="Times New Roman">JMX</span><span style="font-family: 宋体;" face="宋体">技术监测</span><span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span><span style="font-family: 宋体;" face="宋体">集群。</span></p><p class="p0">中文名《用<span style="font-family: Times New Roman;" face="Times New Roman">MC4J</span><span style="font-family: 宋体;" face="宋体">远程监测</span><span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span><span style="font-family: 宋体;" face="宋体">集群</span><span style="font-family: Times New Roman;" face="Times New Roman">-JMX</span><span style="font-family: 宋体;" face="宋体">技术助力</span><span style="font-family: Times New Roman;" face="Times New Roman">Tomcat</span><span style="font-family: 宋体;" face="宋体">》</span></p><p class="p0">英文地址 <a href="http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html">http://www.javaworld.com/javaworld/jw-08-2005/jw-0801-jmx.html</a></p><p class="p0">中文地址 <a href="http://www.matrix.org.cn/resource/article/2005-09-01/Tomcat_MC4J_43706.html">http://www.matrix.org.cn/resource/article/2005-09-01/Tomcat_MC4J_43706.html</a></p></div><img src="http://counter.cnblogs.com/blog/rss/2076280" width="1" height="1" alt=""/><br/><p>本文链接:<a href="http://www.cnblogs.com/obullxl/archive/2011/06/09/apache-tomcat-cluster-config.html" target="_blank">http://www.cnblogs.com/obullxl/archive/2011/06/09/apache-tomcat-cluster-config.html</a>,转载请注明。</p>
</p>
</div>
<div class="entry-ads">
<script type="text/javascript">
<!--
google_ad_client = "ca-pub-2548953017344039";
/* GitIO列表2-728W */
google_ad_slot = "7323935870";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
</div>
<div class="span4">
<div class="sidebar">
<div class="widget">
<h3>推荐排行榜Top5</h3>
<ul>
<li><a href="./topic-blog-13.html" rel="bookmark">使用MySQL的LAST_INSERT_ID来确定各分表的唯一ID值 - 老牛啊</a></li>
<li><a href="./topic-blog-17.html" rel="bookmark">Apache与Tomcat集群配置 - 老牛啊</a></li>
<li><a href="./topic-blog-16.html" rel="bookmark">Android从SDCard中取得图片并设置为桌面背景 - 老牛啊</a></li>
<li><a href="./topic-blog-15.html" rel="bookmark">Android动画之Frame动画实战 - 老牛啊</a></li>
<li><a href="./topic-blog-14.html" rel="bookmark">Android动画之Tween动画实战 - 老牛啊</a></li>
</ul>
</div>
<div class="widget-ads">
<script type="text/javascript">
<!--
google_ad_client = "ca-pub-2548953017344039";
/* GitIO侧边栏-大幅 */
google_ad_slot = "4370469471";
google_ad_width = 300;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<div class="widget">
<h3>评论排行榜Top5</h3>
<ul>
<li><a href="./topic-blog-18.html" rel="bookmark">Android源码下载并在Eclipse中方便查看 - 老牛啊</a></li>
<li><a href="./topic-blog-17.html" rel="bookmark">Apache与Tomcat集群配置 - 老牛啊</a></li>
<li><a href="./topic-blog-16.html" rel="bookmark">Android从SDCard中取得图片并设置为桌面背景 - 老牛啊</a></li>
<li><a href="./topic-blog-15.html" rel="bookmark">Android动画之Frame动画实战 - 老牛啊</a></li>
<li><a href="./topic-blog-14.html" rel="bookmark">Android动画之Tween动画实战 - 老牛啊</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$("#ufrom").val(window.location.href);
});
</script>
<div class="footer">
<div class="container">
<div class="row">
<div id="footer-copyright" class="span6">
© 2013 <a href="http://obullxl.github.io">[email protected]</a>
</div>
<div id="footer-terms" class="span6">
<a href="http://anode.aliapp.com">云博客</a>
<a href="http://obullxl.cnblogs.com">博客园</a>
<script type="text/javascript" src="http://js.tongji.linezing.com/3298180/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/3298180/tongji.gif"/></a></noscript>
</div>
</div>
</div>
</div>
<!-- /footer -->
</body>
</html>