当前位置: > CentOS > CentOS入门 >

CentOS 7 关闭防火墙和SELinux

时间:2016-01-07 19:01来源:linux.it.net.cn 作者:IT网

[修改机器名]

# vi /etc/hostname

 

[关SELinux]

# vi /etc/selinux/config
设置SELINUX=disabled

 

[关防火墙]

# systemctl stop firewalld
# systemctl disable firewalld
# systemctl status firewalld 看状态
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active: inactive (dead)

Sep 01 16:43:44 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Sep 01 16:43:47 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Sep 01 16:50:56 k8s-node1 systemd[1]: Stopping firewalld - dynamic firewall daemon...
Sep 01 16:50:57 k8s-node1 systemd[1]: Stopped firewalld - dynamic firewall daemon.

 

设置完成后重启

# reboot

 

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容