CentOS7.X关闭SELinux

CentOS7.X关闭SELinux
1、查看
[root@dev-server ~]# getenforce
Disabled
心宽一寸病退一丈[root@dev-server ~]# /usr/sbin/sestatus -v
SELinux status:                disabled
2、临时关闭
##设置SELinux 成为permissive模式
##setenforce 1 设置SELinux 成为enforcing模式
setenforce 0
3、永久关闭
LIBORvi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
svd设置后需要重启才能⽣效
centos 7.0 查看selinux状态|关闭|开启
Linux在安装好之后通常SELinux都是出于默认开启的状态,开启的情况下会导致⼀些服务的安装不成功。在不需要的情况下完全可以关闭掉,下⾯是在centos 7.0⾥⾯如何查看,关闭selinux。
查看selinux状态ssl协议
[root@localhost ~]# sestatus
SELinux status:                enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:        /etc/selinux
长绒兔
Loaded policy name:            targeted
Current mode:                  enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:    allowed
Max kernel policy version:      28
临时关闭
[root@localhost ~]# setenforce 0
永久关闭
可以修改配置⽂件/etc/selinux/config,将其中SELINUX设置为disabled。
[root@localhost ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#    enforcing - SELinux security policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
#    disabled - No SELinux policy is loaded.
#SELINUX=enforcing
SELINUX=disabled
少年派 奥斯卡
# SELINUXTYPE= can take one of three two values:
#    targeted - Targeted processes are protected,
#    minimum - Modification of targeted policy. Only selected processes are protected.
#    mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@rdo ~]# sestatus
SELinux status:                disabled

本文发布于:2024-09-22 20:29:47,感谢您对本站的认可!

本文链接:https://www.17tex.com/xueshu/394448.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:开启   状态   设置
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2024 Comsenz Inc.Powered by © 易纺专利技术学习网 豫ICP备2022007602号 豫公网安备41160202000603 站长QQ:729038198 关于我们 投诉建议