环境:
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.主节点配置文件
原文:https://www.cnblogs.com/hxlasky/p/13744626.html