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

     

     

  • 相关阅读:
    Golang学习
    Golang学习
    基础知识
    Golang学习
    基础知识
    hyper-v server 2016安装,客户端远程管理
    inotifywait命令
    CENTOS 7发送邮件测试
    NFS学习
    awk命令
  • 原文地址:https://www.cnblogs.com/kle-cola/p/14023235.html
Copyright © 2011-2022 走看看