systemctl stop firewalld.service && systemctl disable firewalld.service #关闭防火墙,开机不启动
firewall-cmd --state #查看防火墙状态
#CentOS关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
hostnamectl set-hostname ${HNAME} #修改主机名
systemctl stop firewalld.service && systemctl disable firewalld.service #关闭防火墙,开机不启动
firewall-cmd --state #查看防火墙状态
#CentOS关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
hostnamectl set-hostname ${HNAME} #修改主机名
转载于:https://www.cnblogs.com/dengmeinan/p/10580389.html