Redis master-slave sentinel mode restart steps

1. First enter the directory where redis-cli is located

cd /usr/local/bin/

2. Stop the sentinel service first: the sentinels stop one by one, in no order.

Stop sentinel command : After entering redis-cli 6380, execute shutdown

./redis-cli -h 10.19.208.172 -p 6380

auth 6quoxEvGugbEwbY8

shutdown

3. Stop the redis service: first stop the slave, then stop the master.

Stop the redis command : After entering redis-cli 6379, execute shutdown

./redis-cli -h 10.19.208.172 -p 6379

auth 6quoxEvGugbEwbY8

shutdown

4. Then start redis: first start the master, then start the slave

Start the redis command : /usr/local/bin/redis-server /etc/redis.conf

./redis-server /etc/redis/6379.conf

5. Finally start the sentinel

Start the sentinel command : cd /usr/local/bin/ ./redis-server sentinel.conf --sentinel

./redis-server /data/redis/conf/sentinel.conf --sentinel


6. Check the redis information. After entering redis-ci 6380, the main thing to look at is info. #Replication

7. Check the sentinel information. After entering redis-ci 6380, info, mainly look at the last #Sentinel

Guess you like

Origin blog.csdn.net/qq_44031685/article/details/130909413