1、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
systemctl is-enabled firewalld
2、关闭selinux
sed -i “s/SELINUX=enforcing/SELINUX=disabled/g” /etc/sysconfig/selinux
cat /etc/sysconfig/selinux
本文介绍了两个步骤来关闭Linux上的防火墙和SELINUX:首先,通过systemctl命令停止并禁止firewalld服务;然后,使用sed命令修改配置文件将SELINUX状态设为disabled,并验证设置生效。
1、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
systemctl is-enabled firewalld
2、关闭selinux
sed -i “s/SELINUX=enforcing/SELINUX=disabled/g” /etc/sysconfig/selinux
cat /etc/sysconfig/selinux
253
686
1458
1011
996

被折叠的 条评论
为什么被折叠?