查看配置文件

    1. cat redis.conf | grep -v "^#" | grep -v "^$"

    Host A redis.conf

    1. bind 0.0.0.0
    2. protected-mode no
    3. daemonize yes
    4. supervised systemd
    5. requirepass password

    Host A sentinel.conf

    1. protected-mode no
    2. sentinel monitor mymaster HOSTA 6379 1
    3. sentinel down-after-milliseconds mymaster 5000
    4. sentinel auth-pass mymaster password

    Host B redis.conf

    1. bind 0.0.0.0
    2. protected-mode no
    3. port 6379
    4. daemonize yes
    5. supervised systemd
    6. requirepass password
    7. masterauth password
    8. replicaof HOSTA 6379

    Host B sential.conf

    1. protected-mode no
    2. port 26379
    3. daemonize yes
    4. sentinel monitor mymaster HOSTA 6379 1
    5. sentinel down-after-milliseconds mymaster 5000
    6. sentinel auth-pass mymaster password