centos7 常用命令

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}        #修改主机名

 

posted @ 2019-03-22 18:58  邓旭阳  阅读(129)  评论(0)    收藏  举报