一、关闭防火墙

1. 先查看防火墙状态

[root@bogon ~]#

1
systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon

Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)

Active: active (running) since 一 2015-05-25 22:53:54 CST; 3min 18s ago

Main PID: 979 (firewalld)

CGroup: /system.slice/firewalld.service

└─979 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid

5月 25 22:53:54 localhost.localdomain systemd[1]: Started firewalld - dynami...

Hint: Some lines were ellipsized, use -l to show in full.

2. 关闭防火墙

[root@bogon ~]#

1
systemctl stop firewalld

[root@bogon ~]#

1
systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon

Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled)

Active: inactive (dead) since 一 2015-05-25 23:03:56 CST; 3s ago

Process: 979 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)

Main PID: 979 (code=exited, status=0/SUCCESS)

5月 25 22:53:54 localhost.localdomain systemd[1]: Started firewalld - dynami...

5月 25 23:03:55 bogon systemd[1]: Stopping firewalld - dynamic firewall da.....

5月 25 23:03:56 bogon systemd[1]: Stopped firewalld - dynamic firewall daemon.

Hint: Some lines were ellipsized, use -l to show in full.

3. 查看防火墙服务是否开机启动

[root@bogon ~]#

1
systemctl is-enabled firewalld

enabled  #开启

4. 关闭防火墙开机启动

[root@bogon ~]#

1
systemctl disable firewalld

rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'

rm '/etc/systemd/system/basic.target.wants/firewalld.service'

[root@bogon ~]#

1
systemctl is-enabled firewalld

disabled

二、关闭SELinux

1. 查看当前SELinux状态

[root@bogon ~]#

1
getenforce

Enforcing

2. 关闭SElinux

[root@bogon ~]#

1
setenforce 0

[root@bogon ~]# getenforce

Permissive

3. 编辑配置文件

[root@bogon ~]#

1
vim /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 three two values:

#     targeted - Targeted processes are protected,

#     minimum - Modification of targeted policy. Only selected processes are protected.

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

[RHEL7.1]关闭防火墙及SElinux的更多相关文章

  1. CentOS7 关闭防火墙和selinux

    本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux. 关闭防火墙 # 查看防火墙状态 [root@localhost ~]# systemctl status firewalld ...

  2. CentOS 关闭防火墙和selinux

    1)关闭防火墙(每个节点) [Bash shell] 1 2 service iptables stop chkconfig iptables off 2)关闭selinux(重启生效) [Bash ...

  3. Centos7关闭防火墙与selinux

    CentOS 7.0默认使用的是firewall作为防火墙 直接关闭防火墙 systemctl stop firewalld.service #停止firewall systemctl disable ...

  4. Linux关闭防火墙、SELinux

    使用root权限: Linux关闭防火墙: 1. chkconfig –list|grep iptables 2. chkconfig iptables off 永久关闭防火墙 3. chkconfi ...

  5. 永久关闭防火墙和selinux

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

  6. centos 7.X关闭防火墙和selinux

    一.关闭防火墙 centos从7开始默认用的是firewalld,这个是基于iptables的,虽然有iptables的核心,但是iptables的服务是没安装的. 所以你只要停止firewalld服 ...

  7. Redhat 关闭防火墙和selinux

    查看防火墙状态.systemctl status firewalld 临时关闭防火墙命令.重启电脑后,防火墙自动起来.systemctl stop firewalld 永久关闭防火墙命令.重启后,防火 ...

  8. linux关闭防火墙及selinux

    RHEL6.5 查看linux防护墙状态: service iptables status 关闭linux防火墙: 1)永久关闭,重启后生效 开启: chkconfig iptables on 关闭: ...

  9. 关闭防火墙,selinux,交互式设置IP的脚本

    脚本内容: #!/bin/bash # ens=$(cat /proc/net/dev | awk '{if($2>0 && NR > 2) print substr($1 ...

随机推荐

  1. spark 都用了哪些开源东东

    直接上干货 commons-cli http://www.ibm.com/developerworks/cn/java/j-lo-commonscli/ guava http://www.cnblog ...

  2. idea中解决Git反复输入代码的问题

    打开git终端,或者idea中的插件终端,输入命令: git config --global credential.helper store 借用一下别人的图不要介意哈.......... 执行上述命 ...

  3. C#属性升级版--自动属性-chapter 3 P34-36

    使用C#属性,能够通过将数据与它的设置和检索方法分离的方式公开类中的一段数据.   例如:   namespace LanguageFeatures { public class Product { ...

  4. hadoop安装及注意事项

    一.hadoop安装及注意事项1.安装hadoop的环境,必须在你的系统中有java的环境.2.必须安装ssh,有的系统默认就安装,如果没有安装需要手动安装.    可以用yum install -y ...

  5. java基础第6天

    面向对象 当需求单一,或者简单时,我们一步一步去操作没问题,并且效率也挺高.可随着需求的更改,功能的增多,发现需要面对每一个步骤很麻烦了,这时就开始改进,能不能把这些步骤和功能再进行封装,封装时根据不 ...

  6. vue.js 源代码学习笔记 ----- helpers.js

    /* @flow */ import { parseFilters } from './parser/filter-parser' export function baseWarn (msg: str ...

  7. vue.js 源代码学习笔记 ----- codegenEvents.js

    /* @flow */ const fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/ const simplePathRE = / ...

  8. Linux 网络编程->epoll<-LT/ET模式整理(~相逢何必曾相识~)

    今天自己整理一下epoll,网上有很多经典的介绍,看了很多~收藏了很多~还是整理一下做个积累, 自己的东西好找~ 1. epoll 模型简介 epoll 是Linux I/O 多路复用接口 selec ...

  9. Opencv中Rect类

    转载: Rect_类有些意思,成员变量x.y.width.height,分别为左上角点的坐标和矩形的宽和高.常用的成员函数有Size()返回值为一个Size,area()返回矩形的面积,contain ...

  10. [QT_FFMPEG]学习问题: 刚开始移植ffmpeg,测试时出现 undefined reference to `avcodec_configuration()'

    使用环境: window: win7 x64 QT: qt5.8.0 MinGW530 移植的教程: 流若浅  Qt ffmpeg环境搭建 : http://www.cnblogs.com/liuru ...