一、关闭防火墙
为什么要关闭防火墙?集群之间是共同做一件事,此时服务之间的数据通讯比较多,如果有防火墙,就会非常麻烦,所以会进行关闭
# 查看防火墙状态
systemctl status firewalld
# 关闭防火墙
systemctl stop firewalld
# 关闭防火墙开机自启动
systemctl disable firewalld
# 开启防火墙开机自启动
# systemctl enable firewalld
#查看防火墙状态
systemctl status firewalld
二、关闭Selinux
vim /etc/selinux/config
修改后需要重启
三、集群时间同步问题
分布式软件主从角色之间通常基于心跳时间差来判断角色工作是否正常,所以需要同步时间。
1.ntpdate
# 查看当前时间
date
#ntpdate 授时服务器
ntpdate ntp5.aliyun.com
#企业中运维往往不喜欢ntpdate 原因是这个命令同步时间是立即的。不是平滑过渡的。
2.ntp软件
# 通过配置平滑的授时服务器进行时间的同步
# 这里不做介绍