【redis】win10下redis集群

情到浓时终转凉″ 提交于 2020-04-22 13:11:23

 

1、工具

redis3.2.100下载地址:https://github.com/microsoftarchive/redis/releases/download/win-3.2.100/Redis-x64-3.2.100.zip

RedisDesktopManager下载地址(最后一个版本不收钱):https://github.com/uglide/RedisDesktopManager/releases/download/0.9.3/redis-desktop-manager-0.9.3.817.exe

ruby2.3.3下载地址:http://dl.bintray.com/oneclick/rubyinstaller/:rubyinstaller-2.3.3.exe

ruby环境下Redis的驱动下载地址:https://rubygems.org/downloads/redis-3.3.3.gem

redis-trib.rb工具下载地址(如果下载不了,新建一个txt文件把内容复制下来,修改文件名):https://github.com/microsoftarchive/redis/blob/3.0/src/redis-trib.rb

 

2、启动6个redis服务

port 7001    
bind 0.0.0.0  
loglevel notice    
logfile "D:/test/redis/logs/redis7001_log.txt"       
appendonly yes
appendfilename appendonly.7001.aof
cluster-enabled yes                                    
cluster-config-file nodes.7001.conf
cluster-node-timeout 15000
cluster-slave-validity-factor 10
cluster-migration-barrier 1
cluster-require-full-coverage yes
requirepass 123456

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 2.1、安装

D:/test/redis/7001/redis-server.exe --service-install D:/test/redis/7001/redis.7001.conf --service-name redis7001
D:/test/redis/7002/redis-server.exe --service-install D:/test/redis/7002/redis.7002.conf --service-name redis7002
D:/test/redis/7003/redis-server.exe --service-install D:/test/redis/7003/redis.7003.conf --service-name redis7003
D:/test/redis/7004/redis-server.exe --service-install D:/test/redis/7004/redis.7004.conf --service-name redis7004
D:/test/redis/7005/redis-server.exe --service-install D:/test/redis/7005/redis.7005.conf --service-name redis7005
D:/test/redis/7006/redis-server.exe --service-install D:/test/redis/7006/redis.7006.conf --service-name redis7006

 

 双击运行install.cmd

 

 

D:/test/redis/7001/redis-server.exe --service-start --service-name redis7001
D:/test/redis/7002/redis-server.exe --service-start --service-name redis7002
D:/test/redis/7003/redis-server.exe --service-start --service-name redis7003
D:/test/redis/7004/redis-server.exe --service-start --service-name redis7004
D:/test/redis/7005/redis-server.exe --service-start --service-name redis7005
D:/test/redis/7006/redis-server.exe --service-start --service-name redis7006

 

 

3、安装ruby

 

 

 

 

 

 

 

 

 

 

运行命令:gem install --local D:\test\redis\Ruby23\redis-3.3.3.gem

 

.\redis-trib.rb create --replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006

 

 

.\redis-trib.rb check 127.0.0.1:7001

运行命令检查

工具连接

 

 

 

 

 

 

 

 

 

 

 

 后续查找一下资料

 

参考文章:https://blog.csdn.net/mydog520/article/details/81712897

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!