设置Linux环境(三个节点都执行) 1.关闭防火墙 systemctl stop firewalld systemctl disable firewalld 2.关闭Linux sed -i 's/enforcing/disabled/' /etc/selinux/config setenforce 0 3.关闭swap swapoff -a #临时关闭 sed -ri 's/.*swap.*/#&/' /etc/fstab #永久关闭 free -m #验证,swap必须为0 4.添加主机名与IP对应关系: 查看主机名: