centos配置redis的主从复制(2)
在之前的前提下,配置高可用。
添加一台机器[192.168.42.154]来做高可用 同样我们需要设置好,IP,主机名,下载安装redis 192.168.42.154 redis-sentinel #将主机解析追加至其他的4台的hosts文件中,本机也需要一份 cd /usr/local/src wget http://192.168.42.26/install_package/down/redis-3.2.3-1.el7.x86_64.rpm yum install redis-3.2.3-1.el7.x86_64.rpm -y
(1)配置sentinel # sentinel monitor #法定人数 cp /etc/redis-sentinel.conf{,.back} vim /etc/redis-sentinel.conf daemonize yes sentinel monitor mymaster 192.168.42.150 6379 1 sentinel down-after-milliseconds mymaster 5000 sentinel failover-timeout mymaster 18000 sentinel auth-pass mymaster centos.123 #这是认证选项,我们这里的主节点并没有开启认证
(2)启动sentinel redis-sentinel /etc/redis-sentinel.conf 查看端口是否已经启动 netstat -tupln
相关推荐
changecan 2020-11-19
ECSHOP专属建设 2020-11-13
88427810 2020-11-02
步知道 2020-10-27
Junzizhiai 2020-10-10
jackalwb 2020-10-05
小网管 2020-09-03
shiwenqiang 2020-09-14
85251846 2020-09-14
summerinsist 2020-08-21
87901735 2020-08-19
PinkBean 2020-08-11
85407718 2020-08-09
MichelinMessi 2020-07-30
suosuo 2020-07-28
CARBON 2020-07-28
lizhengfa 2020-07-27
88427810 2020-07-26