3.centos 7执行service iptables save报错问题
1.报错
[root@localhost ~]# service iptables save
The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.
2.无法执行的原因是/etc/sysconfig/iptables 这个文件还没有生成呢。需要升级iptables。
[root@localhost ~]# systemctl stop firewalld
systemctl stop [root@localhost ~]# yum install iptables-services.x86_64
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.bit.edu.cn
* extras: mirrors.huaweicloud.com
* updates: mirrors.huaweicloud.com
... ...
Installed:
iptables-services.x86_64 0:1.4.21-34.el7 Complete!
[root@localhost ~]# systemctl enable iptables
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
[root@localhost ~]# systemctl start iptables [root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
3.centos 7执行service iptables save报错问题的更多相关文章
- CentOS7 执行 service iptables save 报错 The service command supports only basic LSB actions xxxxxx
现象描述 在 CentOS 7.6.1810 下执行 service iptables save 命令,出现如下错误: [root@test ~]# service iptables save The ...
- 解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...
- 防火墙centos7执行 service iptables status报错问题完美解决
在centos7 执行防火墙命令时 service iptables status 报错如下: 解决方案 : 1.systemctl start firewalld.service(开启防火墙) 2. ...
- centos7 service iptables save 报错
解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl restart iptables 4.ser ...
- 最新cenos执行service httpd restart 报错Failed to restart httpd.service: Unit not found.
原来是需要将Apache注册到Linux服务里面啊!注册Apache到Linux服务在Linux下用源代码方式编译安装完Apache后,启动关闭Apache可以通过如下命令实现: /usr/local ...
- centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- centos7中没有service iptables save指令来保存防火墙规则
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- centos .7x service iptables save 错误解决方案
保存转发规则的时候,发现service iptables save 无效,而且报错[root@localhost bin]# service iptables saveThe service comm ...
- 31-1.解决service iptables save出错
CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替.service命令只保留下了极少部分使用 ...
随机推荐
- java.io.NotSerializableException: org.apache.kafka.clients.consumer.ConsumerRecord
kafka 与spark集成 序列化问题 sparkConf.set("spark.serializer", "org.apache.spark.serializer.K ...
- 关于Objects类的getClass方法为什么可以得到子类的地址的思考
这一段时间,总是很纠结为什么Objects中的getClass方法可以返回包含子类地址信息的东西(我不确定返回值类型). 因为在Java中,我们定义的父类,我想破脑袋也想不出怎么可以得到子类的信息. ...
- WebRTC ICE 状态与提名处理
大家都知道奥斯卡有提名,其实在 WebRTC 的 ICE 中也有提名,有常规的提名,也有激进的提名,而且提名的候选人不一定是最优秀的候选人喔,本文就带你一探其中玄妙.文章内容主要描述 RFC 5245 ...
- 如何优雅地开发HarmonyOS APP应用
目录: 一.挖掘项目需求或者做项目移植 二.创建项目工程 三.功能模块实现的流程思路 四.养成良好的编程规范习惯以及运用设计模式 研究HarmonyOS有一段时间了,今天主要结合自己多年的项目开发经验 ...
- 【C++】《C++ Primer 》第十七章
第十七章 标准库特殊设施 一.tuple类型 tuple是类似pair的模板,每个pair的成员类型都不相同,但每个pair都恰好有两个成员. 不同的tuple类型的成员类型也不相同,一个tuple可 ...
- LeetCode 二分查找模板 I
模板 #1: int binarySearch(vector<int>& nums, int target){ if(nums.size() == 0) return -1; in ...
- 阿里面试官:什么是MySQL索引,为什么要有索引?
一.什么是索引? 索引就好比字典的目录一样 我们通常都会先去目录查找关键偏旁或者字母再去查找 要比直接翻查字典查询要快很多 二.为什么要有索引? 然而我们在使用mysql数据库的时候也像字典一样有索引 ...
- 【Oracle】下载11.2.0.4的地址
https://updates.oracle.com/download/13390677.html 这个地址就是下载Oracle 11.2.0.4版本的地址,需要有metalink账号才可以下载
- logging模块简单用法
logging模块功能比较多,但一般情况下使用其简单功能就已经足够了. 最简单的用法如下: import logging logging.baiscConfig(level=logging.DEBUG ...
- windows下部署Grafana +prometheus平台监控
1.Prometheus简介 Prometheus基于Golang编写,编译后的软件包,不依赖于任何的第三方依赖.用户只需要下载对应平台包,解压并且添加基本的配置即可正常启Prometheus S ...