zoukankan      html  css  js  c++  java
  • 如何切换SELinux模式?

    SELinux默认运作在"Enforcing"模式。

    $ sestatus -v
    SELinux status:                 enabled
    SELinuxfs mount:                /selinux
    Current mode:                   enforcing
    Mode from config file:          enforcing
    Policy version:                 24
    Policy from config file:        targeted

    "Enforcing"模式下Zend Server CE运行会有问题,安装时需要切换到"Permissive"模式。

    # setenforce permissive

    但这需要每次开机后手动执行,我们可以通过修改SELinux配置实现自动切换。

    # 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=permissive
    # SELINUXTYPE= can take one of these two values:
    #     targeted - Targeted processes are protected,
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted 

    参考文档:Switch SELinux "Enforcing" mode to "Permissive" mode

  • 相关阅读:
    mongo 索引
    nginx gzip配置
    vim 命令
    Mongo小结
    阿里云ECS服务器连接MongoDB
    python 解析Excel
    Django之数据库--ORM
    sql语句
    关于Django的序列化问题。serializers
    MongoEngine模块
  • 原文地址:https://www.cnblogs.com/eastson/p/2688376.html
Copyright © 2011-2022 走看看