标签:
主服务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
标签:
原文地址:http://www.cnblogs.com/lc-for-self/p/5757766.html