1 永久方法 – 须要重启服务器html
修改/etc/selinux/config文件中设置SELINUX=disabled ,而后重启服务器。linux
2 临时方法 – 设置系统参数centos
使用命令setenforce 0服务器
附:
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式post
谢谢!url
centos6 关闭防火墙spa
service iptables stop 临时关闭code
chkconfig iptables off 禁止防火墙开机自启htm
谢谢blog
CentOS 7.0默认使用的是firewall做为防火墙,使用iptables必须从新设置一下
一、直接关闭防火墙
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)
systemctl stop firewalld.service #中止firewall
systemctl disable firewalld.service #禁止firewall开机启动
最后重启系统使设置生效便可。
谢谢