【redis】win10下redis集群
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
运行命令检查
工具连接
下一篇文章获取key的value是一个,估计这是程序的问题。springboot+redis集群
参考文章:https://blog.csdn.net/mydog520/article/details/81712897