关闭SELinux的两种方法

1 永久方法 – 需要重启服务器

修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。

2 临时方法 – 设置系统参数

使用命令setenforce 0

附:
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式

谢谢!

CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下

1、直接关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

最后重启系统使设置生效即可。

谢谢

永久关闭selinux | 防火墙的更多相关文章

  1. Linux 临时和永久关闭 Selinux

    查看当前 Selinux 状态:getenforce 临时关闭 Selinux:setenforce 0 永久关闭 Selinux: vim /etc/sysconfig/selinux 将 SELI ...

  2. 临时和永久关闭Selinux

    临时关闭: [root@localhost ~]# getenforceEnforcing [root@localhost ~]# setenforce 0[root@localhost ~]# ge ...

  3. 永久关闭selinux

    selinux这东西,有时候真让人搞不懂. 临时关闭: setenforce 0 getenforce #查看状态是否是disabled 永久关闭: vim /etc/sysconfig/selinu ...

  4. centos7 关闭SELINUX 防火墙

    关闭SELINUXvi /etc/selinux/config#SELINUX=enforcing #注释掉#SELINUXTYPE=targeted #注释掉SELINUX=disabled #增加 ...

  5. 永久关闭Linux的防火墙

    重启网络服务,加载网卡配置文件systemctl restart network 清空防火墙规则iptables -F 关闭selinux防火墙vi /etc/selinux/config修改如下配置 ...

  6. linux(centos8):禁用selinux(临时关闭/永久关闭)

    一,selinux的用途 1,什么是selinux SELinux:即安全增强型 Linux(Security-Enhanced Linux) 它是一个 Linux 内核模块,也是 Linux 的一个 ...

  7. 查看SELinux状态&关闭SELinux

    1. 查看SELinux状态 1.1 getenforce getenforce 命令是单词get(获取)和enforce(执行)连写,可查看selinux状态,与setenforce命令相反. se ...

  8. [原]关闭selinux

    检查selinux状态 [root@controller0 ~]# getenforce enforcing #disabled表示关闭状态 enforcing表示开启状 临时关闭selinux(不用 ...

  9. 永久关闭防火墙和selinux

    临时关闭selinux: setenforce 0    //设置SELinux 成为permissive模式 彻底禁用selinux: 使用root用户,vim /etc/sysconfig/sel ...

随机推荐

  1. nopCommerce 3.9 大波浪系列 之 NUnit 配置调试环境

    官网:http://nunit.org/ GitHub:https://github.com/nunit 本文只介绍NUnit在VS中的配置使用,进一步学习 NUnit 请参考官方文档. nopCom ...

  2. .Net 调用微信公众号扫一扫

    1.绑定域名 去微信公众号平台中设置js接口安全域名,要注意的是不填写http://, 只填写域名即可,如 www.baidu.com. 一个月只能修改三次,要谨慎填写. 2.引入JS文件 在页面中引 ...

  3. RxSwift 系列(九) -- 那些难以理解的概念

    前言 看完本系列前面几篇之后,估计大家也还是有点懵逼,本系列前八篇也都是参考RxSwift官方文档和一些概念做的解读.上几篇文章概念性的东西有点多,一时也是很难全部记住,大家脑子里面知道有这么个概念就 ...

  4. sql操作一般函数

    sql操作一般函数 函数一般语法:SELECT function(列) FROM 表 函数的基本类型是: Aggregate 合计函数:函数的操作面向一系列的值,并返回一个单一的值. Scalar 函 ...

  5. HDU1035 Robot Motion

    Problem Description A robot has been programmed to follow the instructions in its path. Instructions ...

  6. HDU5742 It's All In The Mind(思维题,水题)

    Problem Description Professor Zhang has a number sequence a1,a2,...,an. However, the sequence is not ...

  7. Dapper入门教程(三)——Dapper Query查询

    介绍 查询方法(Query)是IDbConnection的扩展方法,它可以用来执行查询(select)并映射结果到C#实体(Model.Entity)类 查询结果可以映射成如下类型: Anonymou ...

  8. Mysql自动填充测试数据

    前言 最近写了两个小脚本,一个应用于Mysql的自动填充测试数据,另外一个是bash写的定期删除日志文件,两个脚本如何使用,在GitHub上面都有所说明,这里不再赘述,这里主要是想聊一下Mysql的存 ...

  9. 关于appcompat_v7兼容包的详细说明

    1.appcompat_v7包的由来? appcompat_v7是Google提供的向下兼容包,是针对API level 7(Android2.1)及以上版本所开发的,其作用是为了让兼容低版本API( ...

  10. nopCommerce 3.9 大波浪系列 之 微信公众平台登录插件

    一.简介 插件源码下载:点击下载 微信公众平台网站授权帮助地址:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp142114084 ...