1.先进入redis-cli所在目录
cd /usr/local/bin/
2.先停哨兵服务:哨兵挨个儿停,没有先后顺序
停哨兵命令:redis-cli 6380进入后,执行shutdown
./redis-cli -h 10.19.208.172 -p 6380
auth 6quoxEvGugbEwbY8
shutdown
3.再停redis服务:先停slave,再停master
停redis命令:redis-cli 6379进入后,执行shutdown
./redis-cli -h 10.19.208.172 -p 6379
auth 6quoxEvGugbEwbY8
shutdown
4.然后再启动redis:先启动master,再启动slave
启动redis命令: /usr/local/bin/redis-server /etc/redis.conf
./redis-server /etc/redis/6379.conf
5.最后启动哨兵
启动哨兵命令: cd /usr/local/bin/ ./redis-server sentinel.conf --sentinel
./redis-server /data/redis/conf/sentinel.conf --sentinel
6.查看redis信息,redis-ci 6380进入后,info,主要看的#Replication
7.查看哨兵信息,redis-ci 6380进入后,info,主要看最后的#Sentinel