redis-cluster搭建---windows

0.redis.windows.conf文件参数:

1)改端口:port 6379

2)修改其他配置支持集群
cluster-enabled yes
cluster-config-file nodes-6379.conf
cluster-node-timeout 15000
appendonly yes

备注:nodes-6379.conf启动redis时,文件会自动生成

1.安装:rubyinstaller-2.3.1-x64

3.将redis-3.0.0.gem移动到一个redis里,然后在这个redis里执行命令

gem install redis-3.0.0.gem

redis-3.0.0.gem 是 ruby和redis接口

4.3成功后,将所有的redis启动;

5.在有redis-trib的文件夹里,执行下面命令:

redis-trib.rb create --replicas 1 127.0.0.1:6379 127.0.0.1:6380 127.0.0.1:6381 127.0.0.1:6382 127.0.0.1:6383 127.0.0.1:6384

--replicas 1 表示每个主数据库拥有从数据库个数为1。master节点不能少于3个,所以我们用了6个redis。

6.验证成功

cluster info

查集群节点信息:cluster nodes

相关工具:rubyinstaller-2.3.1-x64、redis-trib、redis-3.0.0.gem、redis:

https://download.csdn.net/download/jiai032023/88637312

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值