需要安装:
yum install ruby
gem install redis-3.0.0.gem
yum install rubygems
修改配置:
port 30001 #分别更改
daemonize yes #允许后台启动,不用再另开终端
cluster-enabled yes
cluster-config-file odes
cluster-node-timeout 5000
appendonly yes
1、启动六台服务器;
2、执行 ./redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006