1. 程式人生 > >selinux的狀態查看及關閉

selinux的狀態查看及關閉

selinux

查看SELinux狀態:

1、/usr/sbin/sestatus -v      ##如果SELinux status參數為enabled即為開啟狀態
SELinux status:                 enabled
2、getenforce                 ##也可以用這個命令檢查

關閉SELinux:

1、臨時關閉(不用重啟機器):

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

2、修改配置文件需要重啟機器:

修改/etc/selinux/config 文件
將SELINUX=enforcing改為SELINUX=disabled

重啟機器即可


本文出自 “藍葉子_架構” 博客,請務必保留此出處http://dellinger.blog.51cto.com/12445009/1965483

selinux的狀態查看及關閉