linux关闭防火墙和selinux
· 关闭防火墙
systemctl stop firewalld.service
关闭开机启动防火墙
systemctl disable firewalld.service
·关闭selinux
查看selinux状态
getenforce
永久关闭
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
# 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
SELINUX=disabled
# 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