首页 > 其他 > 详细

redis配置哨兵模式

时间:2020-09-28 14:50:13      阅读:42      评论:0      收藏:0      [点我收藏+]

环境:
redis版本:4.0.14
os:Centos7

主:  192.168.1.85:8001
从:  192.168.1.85:8002
哨兵:192.168.1.85:8999

1.主节点安装部署
[root@localhost src]# cd /soft/redis-4.0.14/src
[root@localhost src]# make PREFIX=/opt/redis-shaobing/master install
[root@localhost src]# cp redis-trib.rb /opt/redis-shaobing/master/

[root@localhost src]# mkdir -p /opt/redis-shaobing/master/conf
[root@localhost src]# mkdir -p /opt/redis-shaobing/master/logs
[root@localhost src]# mkdir -p /opt/redis-shaobing/master/run
[root@localhost src]# mkdir -p /opt/redis-shaobing/master/data


2.从节点安装部署
[root@localhost src]# cd /soft/redis-4.0.14/src
[root@localhost src]# make PREFIX=/opt/redis-shaobing/slave install
[root@localhost src]# cp redis-trib.rb /opt/redis-shaobing/slave/

[root@localhost src]# mkdir -p /opt/redis-shaobing/slave/conf
[root@localhost src]# mkdir -p /opt/redis-shaobing/slave/logs
[root@localhost src]# mkdir -p /opt/redis-shaobing/slave/run
[root@localhost src]# mkdir -p /opt/redis-shaobing/slave/data


3.哨兵节点安装
[root@localhost src]# cd /soft/redis-4.0.14/src
[root@localhost src]# make PREFIX=/opt/redis-shaobing/sentinel install
[root@localhost src]# cp redis-trib.rb /opt/redis-shaobing/sentinel/
[root@localhost src]# mkdir -p /opt/redis-shaobing/sentinel/conf
[root@localhost src]# mkdir -p /opt/redis-shaobing/sentinel/logs

[root@localhost src]# mkdir -p /opt/redis-shaobing/sentinel/data


4.主节点配置文件

redis配置哨兵模式

原文:https://www.cnblogs.com/hxlasky/p/13744626.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!