- redis根目录新建cluster文件夹
- 拷贝3节点配置文件到cluster文件夹
- redis.7000.conf
- redis.7001.conf
- redis.7002.conf
- 修改对应配置项
1
2
3
4
5
| port 7000
cluster-enabled yes
cluster-config-file nodes.7000.conf
cluster-node-timeout 5000
appendonly yes
|
- redis根目录,编写脚本cluster.bat
1
2
3
4
5
| start redis-server cluster/redis.7000.conf
start redis-server cluster/redis.7001.conf
start redis-server cluster/redis.7002.conf
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 --cluster-yes
|
文章作者
lim
上次更新
2024-11-21
(1dac9ff)
许可协议
CC BY-NC-ND 4.0