1.[root@localhost sbin]# systemctl stop firewalld
2.[root@localhost sbin]# vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled #将enforcing设置成disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
或者:[root@localhost sbin]# sed 's/enforcing/disabled/g' /etc/selinux/config
3.[root@localhost sbin]# service iptables stop