第一种 iptables 防火墙
超级管理员状态下输入指令:service iptables stop
这里状态显示为 Permissive ,SElinux共有3中状态: 宽容模式(permissive) 强制模式(enforcing) 关闭(disabled)
enforcing:强制模式,代表 SELinux 运作中,且已经正确的开始限制 domain/type 了;
permissive:宽容模式:代表 SELinux 运作中,不过仅会有警告讯息并不会实际限制 domain/type 的存取。这种模式可以运来作为 SELinux 的 debug 之用;
disabled:关闭,SELinux 并没有实际运作。
再输入指令:service iptables status 此时显示 iptables 未运行防火墙
就临时关闭了防火墙
第二种 SELinux
临时关闭
setenforce 0
永久关闭
输入:vim/etc/sysconfig/selinux ,打开VIM编辑器后
将SELinux=enforcing改为disabled