Linux服务器关闭SeLinux的方法

xiaoxiao2021-03-01  36

A 不需要重启Linux:

[root@localhost ~]# setenforce 0

B需要重启Linux:

vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled

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

Ref:

SELinux介绍

不重启Linux服务器关闭SeLinux的方法

PS A:

mansetenforce:

XXX XXX WARNING: old character encoding and/or character set XXX setenforce(1) SELinux Command Line documentation setenforce(1) NAME setenforce - modify the mode SELinux is running in. SYNOPSIS setenforce [ Enforcing | Permissive | 1 | 0 ] DESCRIPTION Use Enforcing or 1 to put SELinux in enforcing mode. Use Permissive or 0 to put SELinux in permissive mode. You need to modify /etc/grub.conf or /etc/selinux/config to disable SELinux. AUTHOR Dan Walsh, <dwalsh@redhat.com> SEE ALSO selinux(8), getenforce(8), selinuxenabled(8) FILES /etc/grub.conf, /etc/selinux/config dwalsh@redhat.com 7 April 2004 setenforce(1)

转载请注明原文地址: https://www.6miu.com/read-3100000.html

最新回复(0)