一.插入节点
进入
cd /opt/install/redis-4.0.11
启动
make install PREFIX=/usr/local/redis-cluster/6384
修改redis.conf文件
进入到bin目录下启动redis
./redis-server redis.conf
插入节点
./redis-trib.rb add-node 192.168.121.188:6384 192.168.121.188:6381
进入bin目录下:cd 6381/bin
进入./redis-cli -h 192.168.121.188 -p 6381 -c
查看节点:cluster nodes
cd -
把6381的节点分给6384
./redis-trib.rb reshard 192.168.121.188:6381
二.删除节点
甩锅:./redis-trib.rb reshard 192.168.121.188:6384
删除节点:./redis-trib.rb del-node 192.168.121.188:6384 +节点id
redis 插入新节点 删除节点
最新推荐文章于 2024-01-03 14:05:21 发布