zoukankan      html  css  js  c++  java
  • 关闭selinux

    1、查看SELinux状态:getenforce

    Enforcing(启动)

    disable(禁用)

    1、禁用SELinux(重启后依然生效)

    修改 vi /etc/sysconfig/selinux

    [root@developer ~]#  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

    # SELINUXTYPE= can take one of these two values:
    #     targeted - Targeted processes are protected,
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted

    更改其中的SELINUX项的值就可以关闭和启用SELinux服务了。
    修改成  SELINUX=disable     禁用SeLinux
    修改成  SELINUX=enforcing   使用SeLinux

         vi /etc/selinux/conf
         set SELINUX=disabled

    2、不重启让其生效

       /usr/sbin/setenforce 0 立刻关闭 SELINUX

        /usr/sbin/setenforce 1 立刻启用 SELINUX

    3,加到系统默认启动里面

    echo "/usr/sbin/setenforce 0" >> /etc/rc.local

    echo "/usr/sbin/setenforce 0" >> /etc/rc.local

  • 相关阅读:
    使用c#读取/解析二维码
    MVVM中的RelayCommand与AsyncCommand
    MVVM模式下的OpenFileDialog
    集成Source Monitor至VS中
    [转]异步command的实现
    使用Messenger实现MVVM的对话框弹出
    使用NPOI访问、控制Excel
    win11更新
    Codeforces Round #749 总结
    Codeforces Round #697 (Div. 3)
  • 原文地址:https://www.cnblogs.com/running-mydream/p/4669468.html
Copyright © 2011-2022 走看看