simple Terracotta session 同步

时间:2021-11-03 06:51:55

部署前提: 配置好java环境和已有tomcat实例.

地址1:http://vdisk.weibo.com/s/dzUJr1vLcAWHl

地址2:http://code.taobao.org/p/myweb_project/src/trunk/MyWeb/WebContent/WEB-INF/lib/terracotta-toolkit-1.6-runtime-5.5.0_3.jar

地址3:https://pan.baidu.com/s/1o8B3Hyy#list/path=%2F%E6%88%91%E7%9A%84%E8%B5%84%E6%BA%90%2Fresource_aminglinux&parentPath=%2F%E6%88%91%E7%9A%84%E8%B5%84%E6%BA%90

tar -xf terracotta-3.7.7.tar.gz

mv terracotta-3.7.7 /usr/local/terracotta

cd  /usr/local/terracotta/config-samples

cp tc-config-express-reference.xml tc-config.xml

vim tc-config.xml          ------terracotta配置文件,修改以下内容;

simple Terracotta  session 同步

simple Terracotta  session 同步

/usr/local/terracotta

./bin/start-tc-server.sh           ----terraacotta单实例启动;

simple Terracotta  session 同步

如上图,单台terracotta,启动成功.

增加tomcat配置:

# cp /usr/local/terracotta/common/terracotta-toolkit-1.6-runtime-5.7.0.jar $TOMCAT_HOME/lib/
# cp /usr/local/terracotta/sessions/terracotta-session-1.3.7.jar $TOMCAT_HOME/lib
或者直接cp这两个到/usr/local/tomcat/lib下
 
cd  /usr/local/tomcat/conf
vim context.xml
 在行末增加以下;
simple Terracotta  session 同步

simple Terracotta  session 同步

tomcat+terrcaotta单实例配置完成.

一起学习,进步吧,以上是本人的日常学习,工作总结,希望各位有所收获.