Linux永久关闭防火墙 firewalld和sellinux设置

 

1、关闭 firewalld:

[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld

--------------------------------------

2、关闭 selinux:

[root@localhost ~]# vi /etc/sysconfig/selinux 

SELINUX=disabled    #修改

3、重启机器:

[root@localhost ~]# shutdown -r now

 4、close_firewalld_selinux.sh

#!/bin/bash
systemctl stop firewalld
systemctl disable firewalld
sed -i 's#SELINUX=enforcing#SELINUX=disabled#' /etc/sysconfig/selinux
shutdown -r now

 

posted on 2021-01-14 06:20  wtsgtc  阅读(1726)  评论(0编辑  收藏  举报

导航