1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# 如果有密码的话,使用 -a 指定密码,加入集群的各个节点密码要求一致
$ /data/redis/redis_6379/bin/redis-cli --cluster create 192.168.210.131:6379 192.168.210.132:6379 192.168.210.133:6379 -a 123456
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
>>> Performing hash slots allocation on 3 nodes...
Master[0] -> Slots 0 - 5460
Master[1] -> Slots 5461 - 10922
Master[2] -> Slots 10923 - 16383
M: 4e1fe909c069ba51c40f89a99e74e69eba77388e 192.168.210.131:6379
slots:[0-5460] (5461 slots) master
M: 73f23fdf5374bf4e92dfbc39d112017f086d240c 192.168.210.132:6379
slots:[5461-10922] (5462 slots) master
M: f8d9bef0c981349705733191bd9a6f9eaa6536fa 192.168.210.133:6379
slots:[10923-16383] (5461 slots) master
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join
.
>>> Performing Cluster Check (using node 192.168.210.131:6379)
M: 4e1fe909c069ba51c40f89a99e74e69eba77388e 192.168.210.131:6379
slots:[0-5460] (5461 slots) master
M: 73f23fdf5374bf4e92dfbc39d112017f086d240c 192.168.210.132:6379
slots:[5461-10922] (5462 slots) master
M: f8d9bef0c981349705733191bd9a6f9eaa6536fa 192.168.210.133:6379
slots:[10923-16383] (5461 slots) master
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
|