Red Hat Enterprise Linux 7 shuts down firewall and SELinux
First, close the firewall
1. View the firewall status first
[Email protected] ~]#systemctl status Firewalld
firewalld.service-firewalld-dynamic Firewall daemon
Loaded:loaded (/usr/lib/systemd/system/firewalld.service; enabled)
Active:active (running) since three 2017-10-11 15:31:32 CST; 2min 20s ago
Main pid:809 (FIREWALLD)
CGroup:/system.slice/firewalld.service
└─809/usr/bin/python-es/usr/sbin/firewalld--nofork--nopid
October 15:32:32 db1 systemd[1]: Started firewalld-dynamic firewall daemon.
2. Turn off the firewall
[Email protected] ~]#systemctl stop Firewalld
[Email protected] Desktop]# systemctl status Firewalld
firewalld.service-firewalld-dynamic Firewall daemon
loaded:loaded (/usr/lib/systemd/system/firewalld.service; disabled)
Active:inactive (Dead)
October 23:31:18 DB1 systemd[1]: Starting firewalld-dynamic Firewall Dae .....
October 15:31:32 db1 systemd[1]: Started firewalld-dynamic firewall daemon.
October 15:34:54 db1 systemd[1]: Stopping firewalld-dynamic Firewall dae .....
October 15:34:55 db1 systemd[1]: Stopped firewalld-dynamic firewall daemon.
3. Check if the Firewall service is booting
[Email protected] ~]#systemctl is-enabled firewalld
Enabled #开启
4. Turn off the firewall boot
[Email protected] ~]#systemctl disable FIREWALLD
RM '/etc/systemd/system/dbus-org.fedoraproject.firewalld1.service '
RM '/etc/systemd/system/basic.target.wants/firewalld.service '
[Email protected] ~]#systemctl is-enabled firewalld
Disabled
Second, to close SELinux
1. View current SELinux status
[Email protected] ~]#getenforce
Enforcing
2. Turn off SELinux
[Email protected] ~]# getenforce 0
[Email protected] ~]# getenforce
Permissive
3. Edit the configuration file
[Email protected] ~]#vim/etc/selinux/config
# This file controls the state of the 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=permissive #修改此参数
# selinuxtype= can take one of three the values:
# targeted-targeted processes is protected,
# Minimum-modification of targeted policy. Only selected processes is protected.
# Mls-multi level Security protection.
selinuxtype=targeted
This article is from the "Flower Asahi Blog" blog, please be sure to keep this source http://huazhixu123.blog.51cto.com/1591874/1971452
Red Hat Enterprise Linux 7 shuts down firewall and SELinux