• Centos 7.6关闭selinux


    查看selinux状态

    [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账户登录,记得前边加sudo。

    [root@localhost ~]# vi /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
  • 相关阅读:
    网站迁移服务器后CPU、内存飙升,设置robots.txt 问题
    System.Web.Mvc 找到的程序集清单定义与程序集引用不匹配
    滑动窗口协议
    TCP拥塞控制
    计网常用协议
    TCP协议中的三次握手、四次挥手
    浏览网页的详细过程
    docker网络模式
    openstack网络
    查找算法
  • 原文地址:https://www.cnblogs.com/rhjeans/p/11311108.html
Copyright © 2020-2023  润新知