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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM