4.2 KiB
4.2 KiB
<html>
<head>
</head>
<div class="note-container">
<h1 class="title" id="leanote-title">修改selinux</h1>
<div class="content-html" id="leanote-content"><p>查看SELinux状态:</p><p>1、/usr/sbin/sestatus -v ##如果SELinux status参数为enabled即为开启状态</p><p>SELinux status: enabled</p><p>2、getenforce ##也可以用这个命令检查</p><p>关闭SELinux:</p><p>1、临时关闭(不用重启机器):</p><p>setenforce 0 ##设置SELinux 成为permissive模式</p><p> ##setenforce 1 设置SELinux 成为enforcing模式</p><p>2、修改配置文件需要重启机器:</p><p>修改/etc/selinux/config 文件</p><p>将SELINUX=enforcing改为SELINUX=disabled</p><p>重启机器即可</p></div>
</div>
</html>