"Server1"
Vim/usr/local/lnmp/tomcat/conf/context.xml
<Context>
......
<manager classname= "De.javakaffee.web.msm.MemcachedBackupSessionManager"
Memcachednodes= "n1:172.25.45.1:11211,n2:172.25.45.2:11211"
failovernodes= "N1"
Requesturiignorepattern= ". *\. (ICO|PNG|GIF|JPG|CSS|JS) $ "
Transcoderfactoryclass= "De.javakaffee.web.msm.serializer.kryo.KryoTranscoderFactory"
/>
</Context>
"server2"
Vim/usr/local/tomcat/conf/context.xml
change the value of failovernodes to n2
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/82/B6/wKiom1de9cXTkpeLAABbMRisPIw123.png "title=" Screenshot from 2016-06-13 22_31_05_ see King. png "alt=" Wkiom1de9cxtkpelaabbmrispiw123.png "/>
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/82/B4/wKioL1de9uihMR-pAACtCNvFpFg187.png "title=" Screenshot from 2016-06-13 22_34_30_ see King. png "alt=" Wkiol1de9uihmr-paactcnvfpfg187.png "/>
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/82/B4/wKioL1de9vahtZizAACmltirIT4578.png "title=" Screenshot from 2016-06-13 22_36_00_ see King. png "alt=" Wkiol1de9vahtzizaacmltirit4578.png "/>
"Server1"
Cd/usr/local/lnmp/tomcat/lib
RM-RF Memcached-session-manager-tc6-1.6.3.jar
Cd..
bin/shutdown.sh
bin/startup.sh
Tail Logs/catalina.out
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/82/B4/wKioL1de90WDCC5LAAEN72mPR4E073.png "title=" Screenshot from 2016-06-13 22_44_03_ see King. png "alt=" Wkiol1de90wdcc5laaen72mpr4e073.png "/>
"server2"
Yum Install memcached
/etc/init.d/memcached start
"Server1"
bin/shutdown.sh
bin/startup.sh
Tail Logs/catalina.out
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/82/B4/wKioL1de91KQIWszAAC56IYq_bI272.png "title=" Screenshot from 2016-06-13 22_44_44_ see King. png "alt=" Wkiol1de91kqiwszaac56iyq_bi272.png "/>
"server2"
bin/startup.sh
Tail Logs/catalina.out
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/82/B6/wKiom1de9k6jRVpHAADX8TPOazU800.png "title=" Screenshot from 2016-06-13 22_47_08_ see King. png "alt=" Wkiom1de9k6jrvphaadx8tpoazu800.png "/>
Yum Install Telnet
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/82/B6/wKiom1de9o-zqcKEAAC70WiGB0Q806.png "title=" Screenshot from 2016-06-13 22_59_18_ see King. png "alt=" Wkiom1de9o-zqckeaac70wigb0q806.png "/>
/etc/init.d/memcached Stop will change to n2 when executed
Avoid data loss
(eight) lnmp:nginx+tomcat+memcached of the enterprise part