redis哨兵模式配置

redis配置

redis1

#bind 127.0.0.1        
protected-mode no
daemonize yes
appendonly yes  
loglevel notice
logfile "/home/redis-5.0.2/logs/redis.log"
dir "/home/redis-5.0.2"

redis2

#bind 127.0.0.1 
protected-mode no
daemonize yes 
appendonly yes 
slaveof  redis1 6379 
loglevel notice
logfile "/home/redis-5.0.2/logs/redis.log"
dir "/home/redis-5.0.2"

redis3

#bind 127.0.0.1 
protected-mode no
daemonize yes 
appendonly yes 
slaveof  redis1 6379 
loglevel notice
logfile "/home/redis-5.0.2/logs/redis.log"
dir "/home/redis-5.0.2"

哨兵配置

redis1

sentinel monitor mymaster redis1 6379 2
daemonize yes
protected-mode no
loglevel notice
logfile "/home/redis-5.0.2/logs/sentinel.log"

redis2

sentinel monitor mymaster redis2 6379 2
daemonize yes
protected-mode no
loglevel notice
logfile "/home/redis-5.0.2/logs/sentinel.log"

redis3

sentinel monitor mymaster redis3 6379 2
daemonize yes
protected-mode no
loglevel notice
logfile "/home/redis-5.0.2/logs/sentinel.log"

启动

redis-server /home/redis-5.0.2/redis.conf
redis-sentinel /home/redis-5.0.2/sentinel.conf

相关推荐
©️2020 CSDN 皮肤主题: 技术黑板 设计师:CSDN官方博客 返回首页