1. 程式人生 > >永久關閉selinux | 防火墻

永久關閉selinux | 防火墻

clas 兩種 disable 重啟 lin com config 修改 默認

關閉SELinux的兩種方法

1 永久方法 – 需要重啟服務器

修改/etc/selinux/config文件中設置SELINUX=disabled ,然後重啟服務器。

2 臨時方法 – 設置系統參數

使用命令setenforce 0

附:
setenforce 1 設置SELinux 成為enforcing模式
setenforce 0 設置SELinux 成為permissive模式

謝謝!

Centos7 關閉防火墻

CentOS 7.0默認使用的是firewall作為防火墻,使用iptables必須重新設置一下

1、直接關閉防火墻

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall開機啟動

最後重啟系統使設置生效即可。

謝謝

永久關閉selinux | 防火墻