今天,想在6個redis服務的集羣上,配置固定的主從複製。因爲之前裝集羣的時候,發現master和slave是隨機的。
一開始,redis.conf的內容如下:
ort 7000
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
slaveof 127.0.0.1 7005
啓動服務的時候報錯:'slaveof 127.0.0.1 7005' slaveof directive not allowed in cluster mode
解決方法:
cluster-enabled no 就OK了
後續再補充,如果我的理解有問題,可以留言。