window下配置redis哨兵模式


本文摘自PHP中文网,作者little bottle,侵删。

1.首先把你下载的redis复制两份出来,我的分别如下命名

在D盘下建立一个文件夹,我起名为redis

  • Redis-master
  • Redis-slave1
  • Redis-slave2

2.修改配置文件

  • 2.1修改redis-master的配置文件redis.windows.conf

  • port 6379

  • bind 127.0.0.1

2.2修改redis-slave1 和redis-slave2的配置文件

  • #redis-slave1的配置文件

1

2

3

port 6380

bind 127.0.0.1

slaveof 127.0.0.1 6379

1

2

3

4

#redis-slave2的配置文件

port 6381

bind 127.0.0.1

slaveof 127.0.0.1 6379

3.新建哨兵配置文件,分别命名为

1

2

3

sentinel.conf

sentinel26479.conf

sentinel26579.conf

哨兵配置文件内容
sentinel.conf

1

2

3

4

5

6

port 26379

#master

sentinel monitor master 127.0.0.1 6380 1

sentinel down-after-milliseconds master 5000

sentinel config-epoch master 1

sentinel leader-epoch master 1

sentinel26479.conf

1

2

3

4

5

6

port 26479

#slave1

sentinel monitor master 127.0.0.1 6380 1

sentinel down-after-milliseconds master 5000

sentinel config-epoch master 1

sentinel leader-epoch master 1

sentinel26579.conf

阅读剩余部分

相关阅读 >>

Window10家庭版如何删除自带应用

Window10字体库在哪里

win7版下redis如何设置访问密码的详解(图)

Window10系统更新设置在哪?

Window10和7有什么区别?

msr 分区有什么用

电脑出现错误0x80070079信号灯超时该怎么办?

关于如何关闭Window端口445的详细介绍

linux怎么卸载redis?

win10改win7用legacy还是uefi?

更多相关阅读请进入《Window》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...