首页 > 其他 > 详细

多服务器redis主从配置

时间:2016-08-10 19:00:44      阅读:245      评论:0      收藏:0      [点我收藏+]

主服务master配置redis.conf:

port 6379
appendonly yes
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
daemonize yes
slave-serve-stale-data yes
slave-read-only yes
repl-disable-tcp-nodelay no
slave-priority 100
bind 192.168.1.102

从服务器配置redis.conf:

port 7000
appendonly yes
cluster-enabled no
cluster-config-file nodes.conf
cluster-node-timeout 5000
daemonize yes
bind 192.168.1.109

slaveof 192.168.1.102 6379

先启动master服务redis-server.exe redis.conf

再启动slave服务

slave服务中cluster-enabled no可以去掉,但是不能设置为yes,否则会抛出异常slaveof directive not allowed in cluster mode

 

多服务器redis主从配置

原文:http://www.cnblogs.com/lc-for-self/p/5757766.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!