CentOS7 永久关闭防火墙和SELinux

CentOS7关闭防火墙和SELinux

关闭防火墙

临时关闭防火墙

systemctl stop firewalld
  • 1

临时打开防火墙

systemctl start firewalld
  • 1

防火墙开机关闭

systemctl disable firewalld
  • 1

防火墙开机启动

systemctl enable firewalld
  • 1

查看防火墙状态

systemctl status firewalld
  • 1

关闭selinux

临时关闭SELinux

setenforce 0
  • 1

临时打开SELinux

setenforce 1
  • 1

开机关闭SELinux

vi /etc/selinux/config
修改"SELINUX=disabled"为"SELINUX=disabled"
  • 1
  • 2

查看SELinux状态

getenforce

猜你喜欢

转载自blog.csdn.net/BlueBirdssh/article/details/88173406