关闭selinux开机自启
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 #改成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
关闭selinux
[root@localhost ~]# setenforce 0
检查selinux状态
[root@localhost ~]# getenforce
Permissive
关闭firewalld并且关闭开机自启
[root@localhost ~]# systemctl disable --now firewalld
检查firewalld状态
[root@localhost ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
3月 31 17:10:35 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
3月 31 17:10:35 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'beyond-scope' is not supported by the kerne...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: beyond-scope: INVALID_ICMPTYPE: No supported ICMP type...ime.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'failed-policy' is not supported by the kern...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: failed-policy: INVALID_ICMPTYPE: No supported ICMP typ...ime.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: ICMP type 'reject-route' is not supported by the kerne...pv6.
3月 31 17:10:35 localhost.localdomain firewalld[843]: WARNING: reject-route: INVALID_ICMPTYPE: No supported ICMP type...ime.
3月 31 09:53:05 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
3月 31 09:53:07 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
Hint: Some lines were ellipsized, use -l to show in full.
网友评论