redis

参考
https://www.cnblogs.com/PatrickLiu/p/8458788.html
 
https://www.cnblogs.com/kevingrace/p/7910692.html
 
安装ruby
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
usermod -G rvm hanlei3
rvm list known
rvm install 2.5.1
rvm use 2.5.1
ruby --version
rvm use 2.5.1 --default
gem install redis
 
redis-cli --cluster create  127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:8000 127.0.0.1:8001 127.0.0.1:9001 127.0.0.1:9000 --cluster-replicas 1
常用命令
cluster nodes
cluster meet <ip> <port>                 :将 ip 和 port 所指定的节点添加到集群当中,让它成为集群的一份子。
cluster forget <node_id>                 :从集群中移除 node_id 指定的节点。
cluster replicate <master_node_id>     :将当前从节点设置为 node_id 指定的master节点的slave节点。只能针对slave节点操作。
cluster saveconfig                     :将节点的配置文件保存到硬盘里面。
 
https://www.cnblogs.com/kevingrace/p/7910692.html
 
 
 
 
 
 
 
 
原文地址:https://www.cnblogs.com/han1094/p/10183352.html