redis sentinel
port 7031
dir /opt/app/redis/redis-2.8.17/tmp
sentinel monitor mymaster 10.6.144.155 6379 1
sentinel down-after-milliseconds mymaster 5000
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 15000
sentinel auth-pass mymaster 123456
redis.conf
The configuration file in conf/redis.conf of 102 is configured as the slave relationship of 101
slaveof 192.168.0.101 6379
masterauth master1
Configure the master password in conf/redis.conf of 101
requirepass master1
To view the settings, use the following command
101
./redis-cli
auth master1
info replication
If there is no problem with the configuration, but the master_link_status is always down, and the connected_slaves is always 0,
Find out if the three IPs cannot be connected. If they can be connected, check whether the ports can be connected. You can use telnet on Windows.
telnet 192.168.0.101 6379
If you find that you can't spell it, modify the configuration file, comment out bind 127.0.0.1, restart the service, and try again.