192.168.10.134:7001> cluster nodes d47d5e36f94406cfb9fae476ef1b2e02f611106b 192.168.10.134:7002@17002 master - 0 1540509420000 2 connected 5461-10922 0b3cd4e31e58decdb6faf751f039719ef2d7ec0e 192.168.10.134:7004@17004 slave dcda228e2674a92050aadea54bc770b1cc35f1f5 0 1540509422000 4 connected c19b0d31949d4d55e59e93e841f7bbbd137eb3ed 192.168.10.134:7003@17003 master - 0 1540509423000 3 connected 10923-16383 bf8b5af35f69adc0b2d9c259644b337b7f6768ae 192.168.10.134:7006@17006 slave c19b0d31949d4d55e59e93e841f7bbbd137eb3ed 0 1540509423645 6 connected 43ebe26b217524706e5dd89f9964a86289398851 192.168.10.134:7005@17005 slave d47d5e36f94406cfb9fae476ef1b2e02f611106b 0 1540509421000 5 connected dcda228e2674a92050aadea54bc770b1cc35f1f5 192.168.10.134:7001@17001 myself,master - 0 1540509422000 1 connected 0-5460 192.168.10.134:7001> SHUTDOWN not connected> cluster info [root@localhost bin]# redis-cli -h 192.168.10.134 -p 7002 -c 192.168.10.134:7002> CLUSTER INFO cluster_state:ok cluster_slots_assigned:16384 cluster_slots_ok:16384 cluster_slots_pfail:0 cluster_slots_fail:0 cluster_known_nodes:6 cluster_size:3 cluster_current_epoch:7 cluster_my_epoch:2 cluster_stats_messages_ping_sent:23150 cluster_stats_messages_pong_sent:23184 cluster_stats_messages_meet_sent:1 cluster_stats_messages_fail_sent:24 cluster_stats_messages_auth-ack_sent:1 cluster_stats_messages_sent:46360 cluster_stats_messages_ping_received:23180 cluster_stats_messages_pong_received:22880 cluster_stats_messages_meet_received:4 cluster_stats_messages_fail_received:8 cluster_stats_messages_auth-req_received:1 cluster_stats_messages_received:46073 192.168.10.134:7002> cluster nodes 43ebe26b217524706e5dd89f9964a86289398851 192.168.10.134:7005@17005 slave d47d5e36f94406cfb9fae476ef1b2e02f611106b 0 1540509513000 2 connected dcda228e2674a92050aadea54bc770b1cc35f1f5 192.168.10.134:7001@17001 master,fail - 1540509477614 1540509476508 1 disconnected d47d5e36f94406cfb9fae476ef1b2e02f611106b 192.168.10.134:7002@17002 myself,master - 0 1540509511000 2 connected 5461-10922 0b3cd4e31e58decdb6faf751f039719ef2d7ec0e 192.168.10.134:7004@17004 master - 0 1540509514823 7 connected 0-5460 bf8b5af35f69adc0b2d9c259644b337b7f6768ae 192.168.10.134:7006@17006 slave c19b0d31949d4d55e59e93e841f7bbbd137eb3ed 0 1540509512000 6 connected c19b0d31949d4d55e59e93e841f7bbbd137eb3ed 192.168.10.134:7003@17003 master - 0 1540509513820 3 connected 10923-16383 192.168.10.134:7002>
我用的的安装包有这几个 redis-4.0.11.tar.gz ruby-2.3.7.tar.gz rubygems-update-2.7.7.gem redis-4.0.2.gem
具体搭建过程可以参考这个两篇内容,redis.conf配置里的 bind ip 这个ip要和./redis-trib.rb create --replicas 1 ip1:port 。。。 这里的ip1一致
https://www.cnblogs.com/feiyun126/p/7248989.html
https://www.cnblogs.com/smileyes/p/7489484.html