redis集群搭建

发布时间:2019-03-21 整理:脚本之家
脚本之家收集整理的这篇文章主要介绍了redis集群搭建脚本之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随脚本之家小编过来看看吧!

接下来我们将redis安装到   redis01中,然后make编译一下,会发现在src文件中出现:

redis-trib.rb拷贝到redis-cluster目录下。

 

 

 

> ./redis-trib.rbcreate --replicas .: .: .: .:.: .:/span>

>>>> 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.

 

 

总结

以上是脚本之家为你收集整理的redis集群搭建全部内容,希望文章能够帮你解决redis集群搭建所遇到的程序开发问题。

如果觉得脚本之家网站内容还不错,欢迎将脚本之家网站推荐给程序员好友。

脚本之家官方公众号

微信公众号搜索 “ 程序精选 ” ,选择关注!

微信公众号搜索 “ 程序精选 ” ,选择关注!
精选程序员所需精品干货内容!

脚本之家官方公众号

微信公众号搜索 “ 程序精选 ” ,选择关注!

微信公众号搜索 “ 程序精选 ”
精选程序员所需精品干货内容!