Red Hat Enterprise Linux 7关闭防火墙及SElinux

一、关闭防火墙

1. 先查看防火墙状态

[root@db1 ~]#systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon

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

Active: active (running) since 三 2017-10-11 15:31:32 CST; 2min 20s ago

Main PID: 809 (firewalld)

CGroup: /system.slice/firewalld.service

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

10月 11 15:32:32 db1 systemd[1]: Started firewalld - dynamic firewall daemon.

2. 关闭防火墙

[root@db1 ~]#systemctl stop firewalld

[root@db1 ~]#systemctl status firewalld

firewalld.service - firewalld - dynamic firewall daemon

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

Active: inactive (dead)

10月 11 23:31:18 db1 systemd[1]: Starting firewalld - dynamic firewall dae.....

10月 11 15:31:32 db1 systemd[1]: Started firewalld - dynamic firewall daemon.

10月 11 15:34:54 db1 systemd[1]: Stopping firewalld - dynamic firewall dae.....

10月 11 15:34:55 db1 systemd[1]: Stopped firewalld - dynamic firewall daemon.

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

[root@db1 ~]#systemctl is-enabled firewalld

enabled  #开启

4. 关闭防火墙开机启动

[root@db1 ~]#systemctl disable firewalld

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

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

[root@db1 ~]#systemctl is-enabled firewalld

disabled

二、关闭SELinux

1. 查看当前SELinux状态

[root@db1 ~]#getenforce

Enforcing

2. 关闭SElinux

[root@db1 ~]# getenforce 0

[root@db1 ~]# getenforce

Permissive

3. 编辑配置文件

[root@db1 ~]#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  #注释此行

转载于:https://blog.51cto.com/huazhixu123/1971452

RHEL 7关闭防火墙及SElinux相关推荐

  1. CentOS7关闭防火墙和SELinux

    CentOS7关闭防火墙和SELinux 关闭防火墙 临时关闭防火墙 systemctl stop firewalld 临时打开防火墙 systemctl start firewalld 防火墙开机关 ...

  2. 关闭防火墙和selinux

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

  3. linux命令的使用:配置静态ip,查看网关,dns服务器ip,关闭防火墙,selinux

    linux是:其实就是类unix的操作系统. like unix 使用c语言写的linux linus 李纳斯:kernel(内核):是操作系统内部最核心的软件.作用:1.对cpu进行调度管理2.对内 ...

  4. Linux关闭防火墙、SELinux

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

  5. 关闭防火墙_从零开始学Linux运维|09.关闭防火墙和SElinux

    firewalld是centos7默认的防火墙 安全增强型 Linux(Security-Enhanced Linux)简称 SELinux 初学者建议先关闭,等熟悉了之后再来使用 前期联系中的好多错 ...

  6. selinux= 为 disabled_CentOS7关闭防火墙和SELinux

    关闭防火墙 查看防火墙状态 [root@localhost ~]# systemctl status firewalld 临时关闭(下次开机启动,自动启动防火墙) [root@localhost ~] ...

  7. centos7 关闭防火墙和selinux

    转载自:    http://www.jianshu.com/p/d6414b5295b8 CentOS 7.0 关闭防火墙 CentOS 7.0默认使用的是firewall作为防火墙,使用iptab ...

  8. linux 关闭防火墙 centos7,centos7关闭防火墙和selinux

    CentOS 7.0 关闭防火墙 CentOS 7.0默认使用的是firewall作为防火墙,使用iptables必须重新设置一下 1.直接关闭防火墙 systemctl stop firewalld ...

  9. CentOS 关闭防火墙和selinux

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

  10. linux防火墙禁用web和smb,samba服务器需要关闭防火墙和selinux

    RHE6搭建samba服务有两个需要注意的地方:一是关闭防火墙,二是关闭selinux的设置. 如果防火墙没有关闭,在window的浏览器下输入ip地址后,会提示无法连接. 关闭防火墙的具体做法: ( ...

最新文章

  1. android 壁纸 裁剪,Android图片裁剪之自由裁剪
  2. Windows 10 又在生产环境进行测试?微软:发错了
  3. ansible 发部署nginx以及更新、回滚
  4. H5的Websocket基本使用
  5. UIScrollview 技巧
  6. unity双击打不开脚本_游戏对象和脚本 (创建一个时钟)
  7. C++ 标准库之cctype
  8. 继涉黄被约谈 “比心陪练”App因内容涉宣扬暴力再被处罚
  9. python中random库中shuffle_[宜配屋]听图阁 - 详解Python中打乱列表顺序random.shuffle()的使用方法...
  10. SQL WITH AS
  11. Java 序列化与反序列化详解
  12. c语言的按位取反运算符
  13. PDM中BOM管理技术的研究及其应用
  14. 计算机中的微信无法启动,微信电脑版无法直接打开EXCEL:为什么电脑打不开excel表格...
  15. 微信小程序开发者工具获取不到坐标
  16. elementUI使用el-tabs时,页面崩溃卡死问题
  17. 文件损坏打不开怎么办?excel文件修复,看看这些解决办法
  18. linux里面sftp命令,Linux中sftp命令起什么作用呢?
  19. python leetcode 202. Happy Number
  20. 中国地理知识大全(转载)

热门文章

  1. 第二个冲刺周期第五天
  2. 8.29 脏检查笔记
  3. sap 测试数据生成报表
  4. servlet 单例问题
  5. USACO 1.5 Number Triangles
  6. TwoStep Cluster
  7. 使用.NET Mobile API即51Degrees.mobi检测User-Agent
  8. android app运行显示两个图标
  9. Android属性动画
  10. SenchaEclipsePlugin-1.1.0的使用