secce 发表于 2018-12-7 11:36:43

(八)企业部分之nginx+tomcat+memcached负载均衡集群搭建

  【server1】
vim /usr/local/lnmp/tomcat/conf/context.xml  
  ......
  
  
  
  【server2】
vim /usr/local/tomcat/conf/context.xml  将failoverNodes的值改为n2
http://s1.运维网.com/wyfs02/M00/82/B6/wKiom1de9cXTkpeLAABbMRisPIw123.png
  

http://s2.运维网.com/wyfs02/M00/82/B4/wKioL1de9uihMR-pAACtCNvFpFg187.png
  

http://s4.运维网.com/wyfs02/M02/82/B4/wKioL1de9vahtZizAACmltirIT4578.png
  

  【server1】
cd /usr/local/lnmp/tomcat/lib
rm -rf memcached-session-manager-tc6-1.6.3.jarcd ..
bin/shutdown.sh
bin/startup.sh
tail logs/catalina.outhttp://s4.运维网.com/wyfs02/M00/82/B4/wKioL1de90WDCC5LAAEN72mPR4E073.png
  

  【server2】
yum install memcached
/etc/init.d/memcached start  
  【server1】
bin/shutdown.sh
bin/startup.sh
tail logs/catalina.outhttp://s4.运维网.com/wyfs02/M01/82/B4/wKioL1de91KQIWszAAC56IYq_bI272.png

  

  【server2】
bin/startup.sh
tail logs/catalina.outhttp://s5.运维网.com/wyfs02/M01/82/B6/wKiom1de9k6jRVpHAADX8TPOazU800.png
  

yum install telnet  

http://s2.运维网.com/wyfs02/M02/82/B6/wKiom1de9o-zqcKEAAC70WiGB0Q806.png
  

  当执行/etc/init.d/memcached stop才会改变为n2
  避免数据丢失
  




页: [1]
查看完整版本: (八)企业部分之nginx+tomcat+memcached负载均衡集群搭建