sentinel26379.conf
sentinel26378.conf
sentinel26377.conf
port 26379
dir "/data"
logfile "sentinel-26379.log"
sentinel monitor mymaster 127.0.0.1 6379 2
sentinel auth-pass mymaster 123456
说明
port 哨兵端口
master ip 127.0.0.1
master 端口 6379
后面的 2 表示,如果有三台哨兵,设置为2就是超过50%投票
最后一行是 master 密码和取的名称
docker run -itd --name sentinel26379 -p 26379:26379 -v /www/server/sentinel/sentinel26379.conf:/etc/redis/sentinel.conf -v /www/server/sentinel/data/26379:/data redis redis-sentinel /etc/redis/sentinel.conf
docker run -itd --name sentinel26378 -p 26378:26378 -v /www/server/sentinel/sentinel26378.conf:/etc/redis/sentinel.conf -v /www/server/sentinel/data/26378:/data redis redis-sentinel /etc/redis/sentinel.conf
docker run -itd --name sentinel26377 -p 26377:26377 -v /www/server/sentinel/sentinel26377.conf:/etc/redis/sentinel.conf -v /www/server/sentinel/data/26377:/data redis redis-sentinel /etc/redis/sentinel.conf
网友评论