tomcat负载均衡配置.rar

  • g5_312436
    了解作者
  • 25.6MB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-05 03:24
    上传日期
nginx负载均衡,tomcat session共享配置,所需的安装包。
tomcat负载均衡配置.rar
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/624b4995fc37f87c246b4a94/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/624b4995fc37f87c246b4a94/bg1.jpg"><div class="c x0 y1 w2 h0"><div class="t m0 x1 h2 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#20934;&#22791;&#20004;&#20010;<span class="_ _0"> </span><span class="ff2">tomcat<span class="_ _1"></span><span class="ff1">&#65292;&#20462;&#25913;&#30456;&#24212;&#30340;&#31471;<span class="_ _1"></span>&#21475;<span class="ff2"> </span></span></span></div><div class="t m0 x1 h2 y3 ff2 fs0 fc0 sc0 ls0 ws0"> </div></div><div class="c x2 y4 w3 h3"><div class="t m0 x3 h2 y5 ff1 fs0 fc0 sc0 ls0 ws0">&#21517;&#31216;<span class="ff2"> </span></div></div><div class="c x4 y4 w4 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls1 ws0">IP<span class="ls0"> </span></div></div><div class="c x5 y4 w5 h3"><div class="t m0 x3 h2 y5 ff1 fs0 fc0 sc0 ls0 ws0">&#31471;&#21475;<span class="ff2"> </span></div></div><div class="c x6 y4 w6 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">tomcat<span class="_ _0"> </span><span class="ff1">&#29256;&#26412;</span> </div></div><div class="c x7 y4 w7 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">JDK </div></div><div class="c x2 y6 w3 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">tomcat1 </div></div><div class="c x4 y6 w4 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">10.10.4<span class="_ _1"></span>9.23 </div></div><div class="c x5 y6 w5 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls2 ws0">8080<span class="ls0"> </span></div></div><div class="c x6 y6 w6 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">7.0.40 </div></div><div class="c x7 y6 w7 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">1.7.0_25 </div></div><div class="c x2 y7 w3 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">tomcat2 </div></div><div class="c x4 y7 w4 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">10.10.4<span class="_ _1"></span>9.23 </div></div><div class="c x5 y7 w5 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls2 ws0">8081<span class="ls0"> </span></div></div><div class="c x6 y7 w6 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">7.0.40 </div></div><div class="c x7 y7 w7 h3"><div class="t m0 x3 h2 y5 ff2 fs0 fc0 sc0 ls0 ws0">1.7.0_25 </div></div><div class="c x0 y1 w2 h0"><div class="t m0 x1 h2 y8 ff1 fs0 fc0 sc0 ls0 ws0">&#20462;&#25913;<span class="_ _0"> </span><span class="ff2">nginx.conf<span class="_ _0"> </span></span>&#21152;&#19978;&#65306;<span class="_ _1"></span><span class="ff2"> </span></div><div class="t m0 x8 h4 y9 ff2 fs0 fc0 sc0 ls2 ws0">1.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2">upstream ba<span class="_ _1"></span>ckend { <span class="_ _1"></span> </span></span></div><div class="t m0 x8 h4 ya ff2 fs0 fc0 sc0 ls2 ws0">2.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> server 10<span class="_ _1"></span>.10.49.2<span class="_ _1"></span>3:8080 max_fa<span class="_ _1"></span>ils=1 fail_t<span class="_ _1"></span>imeout=10<span class="_ _1"></span>s; </span></span></div><div class="t m0 x8 h4 yb ff2 fs0 fc0 sc0 ls2 ws0">3.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> server 10<span class="_ _1"></span>.10.49.2<span class="_ _1"></span>3:8081 max_fa<span class="_ _1"></span>ils=1 fail_t<span class="_ _1"></span>imeout=10<span class="_ _1"></span>s; </span></span></div><div class="t m0 x8 h4 yc ff2 fs0 fc0 sc0 ls2 ws0">4.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2">} </span></span></div><div class="t m0 x1 h2 yd ff1 fs0 fc0 sc0 ls0 ws0">&#20462;&#25913;<span class="_ _0"> </span><span class="ff2">nginx.conf<span class="_ _0"> </span></span>&#30340;<span class="_ _0"> </span><span class="ff2">locatio<span class="_ _1"></span>n<span class="_ _0"> </span><span class="ff1">&#25104;</span> </span></div><div class="t m0 x8 h4 ye ff2 fs0 fc0 sc0 ls2 ws0">1.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2">location / <span class="_ _1"></span>{ </span></span></div><div class="t m0 x8 h4 yf ff2 fs0 fc0 sc0 ls2 ws0">2.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> root html; <span class="_ _1"></span> </span></span></div><div class="t m0 x8 h4 y10 ff2 fs0 fc0 sc0 ls2 ws0">3.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> index in<span class="_ _1"></span>dex.html index.<span class="_ _1"></span>htm; </span></span></div><div class="t m0 x8 h4 y11 ff2 fs0 fc0 sc0 ls2 ws0">4.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> proxy_pa<span class="_ _1"></span>ss http://backe<span class="_ _1"></span>nd; </span></span></div><div class="t m0 x8 h4 y12 ff2 fs0 fc0 sc0 ls2 ws0">5.<span class="ff3 ls0"> <span class="_ _2"> </span><span class="ff2"> } </span></span></div><div class="t m0 x1 h2 y13 ff2 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y14 ff1 fs0 fc0 sc0 ls0 ws0">&#21551;&#21160;<span class="_ _0"> </span><span class="ff2">nginx</span>&#12290;<span class="ff2"> </span></div><div class="t m0 x1 h2 y15 ff2 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y16 ff1 fs0 fc0 sc0 ls0 ws0">&#23558;<span class="_ _3"> </span><span class="ff2">tomcat-re<span class="_ _1"></span>dis-session-<span class="_ _1"></span>manager<span class="_ _3"> </span><span class="ff1">&#30456;<span class="_ _1"></span>&#24212;&#30340;<span class="_ _3"> </span><span class="ff2">jar<span class="_ _3"> </span></span>&#21253;<span class="ff2">(<span class="fs1">t<span class="_ _1"></span>omcat-redi<span class="_ _1"></span>s-session<span class="_ _1"></span>-manager<span class="_ _1"></span>-1.2-tomcat-7-J<span class="_ _1"></span>ava-7.jar<span class="_ _1"></span><span class="ff1 fs0">&#12289;</span></span></span></span></span></div><div class="t m0 x1 h2 y17 ff2 fs1 fc0 sc0 ls0 ws0">jedis-2.5.2.jar<span class="_ _1"></span><span class="ff1 fs0">&#12289;<span class="ff2 fs1">commo<span class="_ _1"></span>ns-pool2-2.0.<span class="_ _1"></span>jar<span class="fs0">)<span class="ff1">&#25335;&#36125;&#21040;</span>$<span class="_ _1"></span>TOMCA<span class="_ _1"></span>T_HOME<span class="_ _1"></span>/lib<span class="_"> </span><span class="ff1">&#20013;<span class="_ _1"></span><span class="ff2"> </span></span></span></span></span></div><div class="t m0 x1 h2 y18 ff1 fs0 fc0 sc0 ls0 ws0">&#20462;&#25913;&#20004;&#20010;<span class="_ _0"> </span><span class="ff2">tomcat<span class="_ _0"> </span></span>&#30340;<span class="_ _0"> </span><span class="ff2">conte<span class="_ _1"></span>xt.xml: </span></div><div class="t m0 x1 h5 y19 ff4 fs2 fc0 sc0 ls0 ws0">&lt;Context&gt;<span class="ff2"> </span></div><div class="t m0 x9 h5 y1a ff2 fs2 fc0 sc0 ls3 ws0">&lt;!<span class="ls0">-- Default set <span class="ls4">of</span> monitored resou<span class="_ _4"></span>rces --&gt;<span class="ff4"> </span></span></div><div class="t m0 x9 h5 y1b ff4 fs2 fc0 sc0 ls0 ws0">&lt;WatchedResource&gt;<span class="ff2">WEB-INF/web.xml<span class="_ _4"></span></span><span class="ls5">&lt;/</span>WatchedRe<span class="_ _4"></span>source&gt;<span class="ff2"> </span></div><div class="t m0 x9 h5 y1c ff2 fs2 fc0 sc0 ls0 ws0"> </div><div class="t m0 x9 h5 y1d ff2 fs2 fc0 sc0 ls3 ws0">&lt;!<span class="ls0">-- Uncomment this <span class="ls6">to</span> disab<span class="_ _4"></span>le session persistence across To<span class="_ _4"></span>mcat restarts --&gt;<span class="_ _4"></span> </span></div><div class="t m0 x9 h5 y1e ff2 fs2 fc0 sc0 ls3 ws0">&lt;!<span class="ls0">-- </span></div><div class="t m0 x9 h5 y1f ff2 fs2 fc0 sc0 ls0 ws0">&lt;Manager pathname="" <span class="ls7">/&gt;<span class="_ _4"></span></span> </div><div class="t m0 x9 h5 y20 ff2 fs2 fc0 sc0 ls0 ws0">--&gt; </div><div class="t m0 x9 h5 y21 ff2 fs2 fc0 sc0 ls0 ws0">&lt;!-- Uncomment this <span class="ls6">to</span> enable<span class="_ _4"></span> Comet connection tac<span class="_ _4"></span>king (provides events <span class="ls4">on</span> session<span class="_ _4"></span> expiration <span class="ls8">as</span> well <span class="ls8">as</span> we<span class="_ _4"></span>bapp lifecycle) --&gt; </div><div class="t m0 x9 h5 y22 ff2 fs2 fc0 sc0 ls3 ws0">&lt;!<span class="ls0">-- </span></div><div class="t m0 x9 h5 y23 ff2 fs2 fc0 sc0 ls0 ws0">&lt;Valve className="org.apache.catalina.val<span class="_ _4"></span>ves.CometConnectionManagerValve"<span class="_ _4"></span> <span class="ls7">/&gt;<span class="_ _4"></span></span> </div><div class="t m0 x9 h5 y24 ff2 fs2 fc0 sc0 ls0 ws0">--&gt; </div><div class="t m0 x9 h5 y25 ff4 fs2 fc1 sc0 ls0 ws0">&lt;Valve<span class="ff2"> className="com.orangefunction.to<span class="_ _4"></span>mcat.redissessions.RedisSessionHandlerV<span class="_ _4"></span>alve"<span class="_ _4"></span> </span><span class="ls9">/&gt;</span><span class="ff2"> </span></div><div class="t m0 x9 h5 y26 ff4 fs2 fc1 sc0 ls0 ws0">&lt;Manager<span class="ff2"> className="com.orangefunct<span class="_ _4"></span>ion.tomcat.redissessions.RedisS<span class="_ _4"></span>essionManager"<span class="_ _4"></span> </span></div><div class="t m0 x9 h5 y27 ff2 fs2 fc1 sc0 ls0 ws0">host="10.10.49.20" <span class="_"> </span> </div><div class="t m0 x9 h5 y28 ff2 fs2 fc1 sc0 ls0 ws0">port="6379" </div><div class="t m0 x9 h5 y29 ff2 fs2 fc1 sc0 ls0 ws0">database="0" </div><div class="t m0 x9 h5 y2a ff2 fs2 fc1 sc0 ls0 ws0">maxInactiveInterval="60" <span class="ff4 ls9">/&gt;<span class="_ _4"></span></span> </div><div class="t m0 x1 h5 y2b ff4 fs2 fc0 sc0 ls5 ws0">&lt;/<span class="ls0">Context<span class="_ _4"></span>&gt;<span class="ff2"> </span></span></div><div class="t m0 x1 h2 y2c ff2 fs0 fc0 sc0 ls0 ws0"> </div><div class="t m0 x1 h2 y2d ff2 fs0 fc0 sc0 ls0 ws0"> </div></div><a class="l" rel='nofollow' onclick='return false;'><div class="d m1"></div></a></div><div class="pi" data-data='{"ctm":[1.611792,0.000000,0.000000,1.611792,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐