redis哨兵モード配置

1314 ワード

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