[root@localhost redis-cluster]# ./redis-trib.rb create --replicas 1 xxx xxx xxx xxx xxx xxx
/usr/bin/env: ruby: 没有那个文件或目录
redis5.0.2不需要ruby的环境了
只需要在之前的解压redis目录下
直接执行
[root@localhost redis5.0.2]# ./redis-5.0.2/src/redis-cli --cluster create --cluster-replicas 1 xxx xxx xxx xxx xxx xxx
>>> Performing hash slots allocation on 6 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
Adding replica xxx to xxx
Adding replica xxx to xxx
Adding replica xxx to xxxx
>>> Trying to optimize slaves allocation for anti-affinity
[WARNING] Some slaves are in the same host as their master
M: f8156bc9704bcea5e4b272b8b932644cbb87be45 xxx
slots:[0-5460] (5461 slots) master
M: 611da7e4b1d8efda7b70f20e49d48ef8e1266849 xxx
slots:[5461-10922] (5462 slots) master
M: 69439a0a178e4fb4aaf7c9fe479d419bb159c250 xxx
slots:[10923-16383] (5461 slots) master
S: 26e5b3ceb8