说明:刚刚使用systemctl start firewalld命令开启防火墙的时候,却开不成功,出现Failed to start firewalld.service: Unit is masked的错误,经过搜索下后,发现是firewalld服务被锁定了,这里说下方法。

 

方法

执行命令,即可实现取消firewalld的锁定

systemctl unmask firewalld

解锁后,就可以再开启firewalld防火墙了。

再需要锁定firewalld时执行命令

systemctl mask firewalld

工具/原料

 
  • 阿里云服务器centos

方法/步骤

 
  1.  

    执行firewall-cmd --permanent --zone=public --add-port=3306/tcp,提示FirewallD is not running,如下图所示。

  2.  

    通过systemctl status firewalld查看firewalld状态,发现当前是dead状态,即防火墙未开启。

  3.  

    通过systemctl start firewalld开启防火墙,没有任何提示即开启成功。

  4.  

    再次通过systemctl status firewalld查看firewalld状态,显示running即已开启了。

  5. 5

    如果要关闭防火墙设置,可能通过systemctl stop firewalld这条指令来关闭该功能。

  6. 6

    再次执行执行firewall-cmd --permanent --zone=public --add-port=3306/tcp,提示success,表示设置成功,这样就可以继续后面的设置了。

    END
 

CentOS 7出现Failed to start firewalld.service: Unit is masked的解决办法和firewalld 防火墙开关的更多相关文章

  1. centos7 Failed to start firewalld.service: Unit is masked.

    centos7 启动防火墙失败:Failed to start firewalld.service: Unit is masked.   ---- 刚yum安装了iptables 解决: 执行”sys ...

  2. 执行 systemctl start firewalld 命令后出现Failed to start firewalld.service: Unit is masked

    firewalld服务被锁定,不能添加对应端口 执行命令,即可实现取消服务的锁定 # systemctl unmask firewalld 下次需要锁定该服务时执行 # systemctl mask ...

  3. CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

    错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed t ...

  4. [ISSUE] [Centos] Centos Start Nginx Show: Failed to start nginx.service:unit not found

    CMD Line:systemctl start nginx.serviceFailed to start nginx.service: Unit not found. Solution: 1.vim ...

  5. Failed to stop iptables.service: Unit iptables.service not loaded.解决方法

    CentOS7中执行 service iptables start/stop 会报错Failed to start iptables.service: Unit iptables.service fa ...

  6. Failed to stop iptables.service: Unit iptables.service not loaded.

    redhat 7 [root@lk0 ~]# service iptables stop Redirecting to /bin/systemctl stop iptables.service Fai ...

  7. centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not foundc

    现象: 在centOS7中启动MySQL数据库提示: Failed to start mysqld.service: Unit not found [明明已经安装了,为什么提示不存在呢?] 原因: 在 ...

  8. centos7安装MariaDB以及Failed to start mariadb.service: Unit not found的错误解决

    centos7下yum安装MariaDB CentOS 7下mysql下替换成MariaDB了.MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权 许可 Mari ...

  9. Failed to start mongod.service: Unit not found

    其实自己用惯的是MYSQL,然后项目最后一步完善数据读写的部分,本来打算用mysql的,然而在centOS系统上发现安装总是出问题,后来查找一下资料,发现centOS系统上一般用的是Mariadb,这 ...

随机推荐

  1. Windows7配置QT-Android开发环境!

    配置QT5.2.0-Android版本: 进行windows7下的软件开发~不用使用eclipse开发android软件,配置之后就可以向写C++代码一样,去写APP在Android手机上去运行了! ...

  2. 中英文对照 —— 手机 App/PC 端软件(系统)、互联网

    0. 经典 & 缩略词 SMS:short message service,短信息服务, SMS code,短信验证码: swipe:vt. 猛击:偷窃:刷-卡 Swipe up/down/r ...

  3. 张忠谋:3nm制程会出来 2nm后很难(摩尔定律还可维持10年)

    集微网消息,台积电董事长张忠谋表示,摩尔定律可能还可再延续10年,3nm制程应该会出来,2nm则有不确定性,2nm之后就很难了. 张忠谋表示,1998年英特尔总裁贝瑞特来台时,两人曾针对摩尔定律还可延 ...

  4. C#实现进程内存信息获取

    using System.Collections.Generic;using System.Runtime.InteropServices;using System;using System.Diag ...

  5. sdut 5-1 继承和派生

    5-1 继承与派生 Time Limit: 1000MS Memory limit: 65536K 题目描写叙述 通过本题目的练习能够掌握继承与派生的概念.派生类的定义和用法.当中派生类构造函数的定义 ...

  6. cocos2d-x 显示触摸操作(单击显示效果浪潮,对于视频演示)-绩效转型

    http://blog.csdn.net/hitwhylz/article/details/26042751 首先是显示触摸操作. 在文章最后.对性能进行一些提升改造. 由于要演示我们的作品.使用试玩 ...

  7. ASP .NET Model

    Model是全局变量,一个页面一个 前台 @ModelWebApplication1.Models.Movie; @{ ViewBag.Title = "ModelTest"; } ...

  8. 将自定义控件加载到RichTextbox并进行交互

    先前遇到一个问题,将自定义控件加载到RichTextbox后,无法触发自定义控件的各种事件,最终找到解决办法:设置RichTextbox的IsDocumentEnabled="True&qu ...

  9. 梧桐那时雨http://blog.csdn.net/fuchaosz/article/details/51882935?readlog

    Ubuntu 16.04 一系列软件安装命令,包括QQ.搜狗.Chrome.vlc.网易云音乐安装方法 原创 2016年07月20日 11:44:01 标签: ubuntu 27024 1 简介 Ub ...

  10. RedHat 7.3+ORACLE 12c RAC 使用udev绑定磁盘

    在RedHat 7中,很多命令发生了改变,其中使用udev对磁盘绑定的命令也发生了变更,不再使用start_udev,而是改为了udevadm,下面具体介绍如何使用udev对磁盘进行绑定,这里对6和7 ...