zoukankan      html  css  js  c++  java
  • centos关闭Selinux

    • SELinux三种模式

      • Enforcing:强制模式。代表SELinux在运行中,且已经开始限制domain/type之间的验证关系
      • Permissive:半关闭。代表SELinux在运行中,但不使用规则,进程仍可以对文件进行操作。不过如果验证不正确会发出警告
      • Disabled:关闭模式。SELinux并没有实际运行
    • 相关命令

      • sestatus –v
        //查询当前 selinux 状态(详细)
      • getenforce
        //获取当前 selinux 状态
      • setenforce 1
        //临时开启(0 关闭)
      • ls –Z
        //查看文件的 selinux 类型
    • 永久关闭

      • 修改/etc/sysconfig/selinux文件中的SELINUX=enforcing为SELINUX=disabled,如下配置文件。
      • Selinux是内核级别的访问控制的安全模块,所以修改完必须重启系统。
    [root@Centos7.4 ~]# cat /etc/sysconfig/selinux 
    
    # 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=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 
    


    作者:Outsrkem
    出处:https://www.cnblogs.com/outsrkem/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

  • 相关阅读:
    什么是经验
    Linux驱动开启调试信息
    insecticide|contradictions| at large|delay doing|
    timber|stain|compensate|
    whip|resist|patch|intimate|
    chop|divorce|harsh|mutual|compel|
    crack|erosion|strip|
    stack|session|fuss|anniversary
    abrupt|promising
    nevertheless|magnificent |prosperous|
  • 原文地址:https://www.cnblogs.com/outsrkem/p/11251959.html
Copyright © 2011-2022 走看看