sentinel

启动sentinel

执行

redis-sentinel /path/to/sentinel.conf

或

redis-server /path/to/sentinel.conf --sentinel

以上两种方式启动sentinel的效果是一样的。注意,sentinel.conf文件在sentinel运行期间被实时修改的,要确保sentinel.conf文件对当前用户是可写的

redis-sentinel 默认使用的端口是26379

#最简单的sentinel配置:

sentinel monitor mymaster 127.0.0.1 6379 1

sentinel down-after-milliseconds mymaster 60000

sentinel failover-timeout mymaster 180000

sentinel parallel-syncs mymaster 1

#redis-sentinel默认是前台启动的,想要后台启动加在sentinel.conf文件插入以下内容:

daemonize yes

logfile "/data/logs/redis-sentinel/sentinel.log"

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容