1,下载Redis for windows 的最新版本,解压到 c:\Redis 目录下备用
https://github.com/MSOpenTech/redis/releases
当前我使用的是 3.0.501
2,下载 RubyInstaller
http://rubyinstaller.org/downloads/
安装时,勾选
Install Td/Tk Support
Add Ruby executables to your PATH
Associate .rb and .rbw files with this Ruby installation
3,下载 redis-trib.rb , 放到 c:\redis 目录下备用
https://raw.githubusercontent.com/antirez/redis/unstable/src/redis-trib.rb
4,新建6个子文件夹
cmd
cd c:\redis
mkdir 7000 7001 7002 7003 7004 7005
5,将如下配置修改,分别放入上一步新建的6个子文件夹中, 保存为 redis.conf:
port 7000
cluster-enabled yes
cluster-config-file nodes-7000.conf
cluster-node-timeout 5000
appendonly yes
注意,将 port 和 cluster-config-file 改掉(每个文件都不一样)
6, 为方便启动这些 Redis 实例,新建如下 bat 文件:
@echo off
cd c:\Redis
start Redis-Server ./6379/redis.conf
start Redis-Server ./6380/redis.conf
start Redis-Server ./6381/redis.conf
7, 运行上步新建的 bat 文件&
windows下集群Redis
最新推荐文章于 2023-06-19 19:41:44 发布