zoukankan      html  css  js  c++  java
  • CentOS 7 关闭Selinux

    查询SeLinux状态 

    方法一、​

    ​getenforce​

    默认显示Enforcing,如果是关闭则显示Disabled

    方法二、​

    /usr/sbin/sestatus -v​

    第一行默认显示SELinux status: enabled

     

    临时关闭

    ​​setenforce 0

    永久关闭

    ​​vi /etc/selinux/config​

    将文件中的SELINUX=enforcing改为SELINUX=disabled

    然后重启机器生效,reboot

     

     

    临时关闭:

    [root@localhost ~]# getenforce
    Enforcing

    [root@localhost ~]# setenforce 0
    [root@localhost ~]# getenforce
    Permissive

    永久关闭:

    [root@localhost ~]# vim /etc/sysconfig/selinux

    SELINUX=enforcing 改为 SELINUX=disabled

    修改配置需要重启

    [root@localhost ~]# reboot

     

     

  • 相关阅读:
    uoj 36 玛里苟斯
    readlink
    Endless Spin
    rm
    rmdir
    [学习笔记]min-max容斥
    cp
    [HAOI2015]按位或
    java实现第四届蓝桥杯公式求值
    java实现第四届蓝桥杯危险系数
  • 原文地址:https://www.cnblogs.com/kle-cola/p/14023235.html
Copyright © 2011-2022 走看看