- Redis一主二从三哨兵
- 配置好yum源后
- 关闭防火墙
- Systemctl stop firewalld
- Iptables -F
- Iptables -X
- Iptables -Z
- 修改安全策略
- Sed -I ‘s SELINUX= enforcing/ SELINUX=disabled/g’ /etc/selinux/config
-
所有节点安装redis服务
- 修改配置文件
- Master节点:
- 路径/etc/redis.conf
- 修改两个从节点的配置文件
- 路径/etc/redis.conf
- 所有节点启动redis服务
- 进入redis查看是否加入成功
- 配置redis哨兵模式,修改配置文件
- /etc/redis-sentinel.conf
- 添加bind 0.0.0.0
- 把protected-mode no 注释打开
- 把/etc/redis-sentinel.conf配置文件复制到从节点
- 重启服务
- Systemctl restart redis-sentinel
- 验证,表示部署成功
redis一主二从三哨兵
最新推荐文章于 2024-08-14 17:47:03 发布