接下来我们将redis安装到 redis01中,然后make编译一下,会发现在src文件中出现:
redis-trib.rb拷贝到redis-cluster目录下。
>>>> Creating cluster
>Connecting to node .:: OK
>Connecting to node .:: OK
>Connecting to node .:: OK
>Connecting to node .:: OK
>Connecting to node .:: OK
>Connecting to node .:: OK
>>>> Performing hash slotsallocation on nodes...
>Using masters:
>.:
>.:
>.:
>Adding replica .: to .:
>Adding replica .: to .:
>Adding replica .: to .:
>M: 5a8523db7e12ca600dc82901ced06741b3010076127..:
> slots:- ( slots) master
>M: bf6f0929044db485dea9b565bb51e0c917d20a53127..:
> slots:- ( slots) master
>M: c5e334dc4a53f655cb98fa3c3bdef8a808a693ca127..:
> slots:- ( slots) master
>S: 2a61b87b49e5b1c84092918fa2467dd70fec115f127..:
> replicates 5a8523db7e12ca600dc82901ced06741b3010076
>S: 14848b8c813766387cfd77229bd2d1ffd6ac8d65127..:
> replicates bf6f0929044db485dea9b565bb51e0c917d20a53
>S: 3192cbe437fe67bbde9062f59d5a77dabcd0d632127..:
> replicates c5e334dc4a53f655cb98fa3c3bdef8a808a693ca
>Can I the above configuration? (type to accept): >yes
>>>> Nodes configuration updated
>>>> Assign a different configepoch to each node
>>>> Sending CLUSTER MEET messagesto join the cluster
>Waiting the cluster to join.....
>>>> Performing Cluster Check( node .:)
>M: 5a8523db7e12ca600dc82901ced06741b3010076127..:
> slots:- ( slots) master
>M: bf6f0929044db485dea9b565bb51e0c917d20a53127..:
> slots:- ( slots) master
>M: c5e334dc4a53f655cb98fa3c3bdef8a808a693ca127..:
> slots:- ( slots) master
>M: 2a61b87b49e5b1c84092918fa2467dd70fec115f127..:
> slots: ( slots) master
> replicates 5a8523db7e12ca600dc82901ced06741b3010076
>M: 14848b8c813766387cfd77229bd2d1ffd6ac8d65127..:
> slots: ( slots) master
> replicates bf6f0929044db485dea9b565bb51e0c917d20a53
>M: 3192cbe437fe67bbde9062f59d5a77dabcd0d632127..:
> slots: ( slots) master
> replicates c5e334dc4a53f655cb98fa3c3bdef8a808a693ca
>[OK] All nodes agree about slotsconfiguration.
>>>> Check open slots...
>>>> Check slots coverage...
>[OK] All slots covered.