Redhat使用了SELinux来增强安全,关闭的办法为:
1. 永久有效
修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然后重启。
2. 即时生效
setenforce 0

关闭防火墙的方法为:
1. 永久性生效
开启:chkconfig iptables on
关闭:chkconfig iptables off
2. 即时生效,重启后失效
开启:service iptables start
关闭:service iptables stop

需要说明的是对于 Linux 下的其它服务都可以用以上命令执行开启和关闭操作

补充:
a. 防火墙还需要关闭ipv6的防火墙:
chkconfig ip6tables off
并且可以通过如下命令查看状态:
chkconfig --list iptables
b. selinux状态可以通过以下命令查看:
sestatus

http://blog.chinaunix.net/uid-11582448-id-3157977.html

Redhat关闭SELinux和防火墙的办法(转)的更多相关文章

  1. 关闭 selinux 和防火墙

    1.关闭 selinux 修改 它的配置文档 /etc/selinux/conf 修改 SELINUX=disabled 或者permissive 2. 关闭 防火墙 输入命令 systemctl d ...

  2. RedHat Linux关闭seLinux命令

    Redhat使用了SELinux来增强安全,关闭的办法为: 1. 永久有效 修改 /etc/selinux/config 文件中的 SELINUX="" 为 disabled ,然 ...

  3. 关闭SELinux和iptables防火墙

    1.关闭SELinux: 编辑SELinux配置文件: [root@Redis selinux]# vim /etc/selinux/config 修改SELINUX配置项为disable SELIN ...

  4. linux初始化配置---主机名、关闭防火墙、关闭selinux

    一.修改主机名 1.零时修改 [root@localhost network-scripts]# hostname jw07 然后就可以看到我们的主机名被修改了

  5. Linux关闭防火墙,关闭Selinux

    查看防火墙状态 iptables -L or service iptables status 临时性关闭防火墙 iptables -F or service iptables stop 永久性关闭防火 ...

  6. 永久关闭selinux | 防火墙

    关闭SELinux的两种方法 1 永久方法 – 需要重启服务器 修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器. 2 临时方法 – 设置系统参数 ...

  7. ifconfig 命令,改变主机名,改DNS hosts、关闭selinux firewalld netfilter 、防火墙iptables规则

    ifconfig 命令用于查看网络相关的命令: 安装:yum install net-tools -y  ifdown  eth_name  关闭网卡  ifup  eth_name   开启网卡 配 ...

  8. centos7防火墙以设置以及关闭selinux

    一.CentOS 7.X 关闭SELinux 1.查看 getenforce permissive 或者 enforcing模式 2.临时设置 setenforce 1 成为permissive模式 ...

  9. SElinux以及防火墙的关闭

    [root@localhost targeted]# pwd/etc/selinux/targeted[root@localhost targeted]# getsebool -a|grep samb ...

随机推荐

  1. Resharper上手指南

    原文http://www.cnblogs.com/renji/archive/2007/12/11/resharper.html Resharper上手指南 我是visual studio的忠实用户, ...

  2. MS Build参考

    以下链接很详细的讲述了Build方面相关的知识,顺带连Link的参数都解释了,以后不知道就来这里查一查了. http://msdn.microsoft.com/zh-CN/library/ee8624 ...

  3. logstash 字段类型转换后 需要刷新

    filter { grok { match => [ "message" , "\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HT ...

  4. C/C++内存存储问题

    #include <stdio.h> #include "string.h" #include "malloc.h" void Swap(int a ...

  5. DB2 中日期 比较

    在DB2中的Date 一共识别三种格式,最常见的是这样 '2013-12-12' 对,你没看错,DB2认为这样的字符串就是Date数据 然后我们可以利用函数这样寻找日期区间 select * from ...

  6. py练习

    功能类似pop def myPop():    l=[]    a=raw_input('a:')    for i in a:        l.append(i)    l.pop()    pr ...

  7. Guava源码分析——ServiceManager

    ServiceManager类:      用于监控服务集的管理器,该类提供了诸如startAsync.stopAsync.servicesByState方法来运行.结束和检查服务集,而且,通过监听器 ...

  8. kaggle之数字序列预测

    数字序列预测 Github地址 Kaggle地址 # -*- coding: UTF-8 -*- %matplotlib inline import pandas as pd import strin ...

  9. SpringMvc学习-环境搭建

    最近在学习SpringMVC,首先来说说SpringMVC项目的搭建. 1.SpringMVC简介 spring Web MVC是一种基于Java的实现了Web MVC设计模式的请求驱动类型的轻量级W ...

  10. QQ浏览器不支持JS问题

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...