1.永久关闭Firewall
关闭防火墙 systemctl stop firewalld(临时关闭)
禁止开机自启systemctl disable firewalld(永久关闭)
查看防火墙状态systemctl status firewalld
2.永久关闭SELINUX
查看SELINUX状态
cat /etc/sysconfig/selinux
[root@Lenovo /]# cat /etc/sysconfig/selinux
# 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=enforcing
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@Lenovo /]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux
SELINUX=enforcing 改为 SELINUX=disabled
重启服务reboot