本文将简单介绍在CentOS7上如何临时和永久关闭防火墙和selinux。

关闭防火墙

# 查看防火墙状态
[root@localhost ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: active (running) since 二 2019-03-26 19:21:11 CST; 3 weeks 0 days ago
Main PID: 907 (firewalld)
CGroup: /system.slice/firewalld.service
└─907 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid 3月 26 19:21:10 localhost.localdomain systemd[1]: Starting firewalld - dynam...
3月 26 19:21:11 localhost.localdomain systemd[1]: Started firewalld - dynami...
Hint: Some lines were ellipsized, use -l to show in full. # 临时关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service # 禁止防火墙开机启动,永久关闭
[root@localhost 桌面]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

关闭Selinux

查看selinux状态
[root@localhost ~]# getenforce
Enforcing 临时关闭selinux
[root@localhost ~]# setenforce 0
[root@localhost ~]# getenforce
Permissive 永久关闭|禁止开机启动
进入到/etc/selinux/config文件
vim /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled,重启生效。

CentOS7 关闭防火墙和selinux的更多相关文章

  1. Centos7关闭防火墙与selinux

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

  2. CentOS7关闭防火墙和selinux

    直接上命令 在root用户下 systemctl stop firewalld systemctl disable firewalld systemctl status firewalld vi /e ...

  3. centos7 关闭防火墙

    centos7 关闭防火墙 1.firewall相关的操作    查看防火墙状态 firewall-cmd    --state 关闭防火墙 systemctl  stop   firewalld.s ...

  4. CentOS 关闭防火墙和selinux

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

  5. Linux关闭防火墙、SELinux

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

  6. 永久关闭防火墙和selinux

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

  7. [RHEL7.1]关闭防火墙及SElinux

    一.关闭防火墙 1. 先查看防火墙状态 [root@bogon ~]# 1 systemctl status firewalld firewalld.service - firewalld - dyn ...

  8. CentOS7 关闭防火墙[转]

    CentOS6关闭防火墙使用以下命令, /临时关闭 service iptables stop //禁止开机启动 chkconfig iptables off CentOS7中若使用同样的命令会报错, ...

  9. centOS7关闭防火墙的命令

    centOS7下关闭防火墙的命令已经改了,如下:      systemctl stop firewalld

随机推荐

  1. 使用jQuery的分页插件jquery.pagination.js进行分页

    1,需要用到jquery.pagination.js和pagination.css https://pan.baidu.com/s/1G3PLQSRGjvLxl2ryqpV76w https://pa ...

  2. Python 安装 imread报错

    看到一篇博客才解决 http://blog.csdn.net/u010480899/article/details/52701025

  3. Daily Scrum 10.22

    (写于10.22周四0晨) 昨天任务还未完成的继续完成任务. 每个人都查看自己的TFS,修改已经完成的任务状态,改为已关闭-已完成. 由于android studio运行过于慢,我们统一采取eclip ...

  4. 初学Hadoop之单机模式环境搭建

    本文仅作为学习笔记,供大家初学Hadoop时学习参考.初学Hadoop,欢迎有经验的朋友进行指导与交流! 1.安装CentOS7 准备 CentOS系统镜像CentOS-7.0-1406-x86_64 ...

  5. 个人作业Week2-代码复审

    代码复审Check List 概要部分 代码能符合需求和规格说明么? 符合.针对-c和-s可以将正确的结果输出到相应的sudoku.txt,并在规定的时间内求解. 代码设计是否有周全的考虑? 有的.我 ...

  6. 【python】自学笔记

    参考文献 1.环境安装 1.1 python 工作环境 2.7.14 1.2 pycharm community2018.1.1 4 x64 2.第一行代码 2.1 python交互模式, >& ...

  7. 新版vue-cli如何使用json-server来mork

    新版vue-cli如何使用json-server来mork 原创 2018年03月06日 11:28:32 标签: vue / 前端 / webpack / vue-cli 185 新版的vue-cl ...

  8. IntelliJ IDEA中文乱码问题

    转自  https://blog.csdn.net/m0_37893932/article/details/78280663 1 file->settings->appearence里面有 ...

  9. Java之工具类:判断对象是否为空或null

    import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; /** * 判断对象是否为空或nu ...

  10. 10缓冲流、转换流、序列化流、Files

    十.流 10.1 缓冲流 10.1.1 概述                 缓冲流是对4个基本的FileXxx流的增强,所以也是4个流,按照数据类型进行分类                     ...