redis单哨兵模式
1.cd /usr/local/src
找到源码包 cd redis-6.2.14
哨兵配置模板sentinel.conf
复制或替换sentinel.conf
grep -Ev "^$|^#" /usr/local/src/redis-6.2.14/sentinel.conf > /etc/redis/sentinel.conf
编辑文件:vim /etc/redis/sentinel.conf 把IP改成主节点的ip地址
启动哨兵:redis-sentinel /etc/redis/sentinel.conf
启动哨兵之后显示的内容:
查看:ps -ef|grep redis
root 22938 1 0 02:29 ? 00:00:10 /usr/local/redis/bin/redis-server 0.0.0.0:6379
root 24234 2548 0 03:02 pts/0 00:00:00 grep --color=auto redis