31-1.解决service iptables save出错
CentOS 7.x开始,CentOS开始使用systemd服务来代替daemon,原来管理系统启动和管理系统服务的相关命令全部由systemctl命令来代替。service命令只保留下了极少部分使用,大部分命令都要改用systemctl使用。
[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.
关闭防火墙
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl mask firewalld ----注销服务
Created symlink from /etc/systemd/system/firewalld.service to /dev/null.
安装iptables
[root@localhost ~]# yum install iptables
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.huaweicloud.com
* extras: mirror.bit.edu.cn
* updates: mirrors.huaweicloud.com
Running transaction
Updating : iptables-1.4.21-34.el7.x86_64 1/2
Cleanup : iptables-1.4.21-18.0.1.el7.centos.x86_64 2/2
Verifying : iptables-1.4.21-34.el7.x86_64 1/2
Verifying : iptables-1.4.21-18.0.1.el7.centos.x86_64 2/2 Updated:
iptables.x86_64 0:1.4.21-34.el7 Complete!
设置iptables开机启动
[root@localhost ~]# systemctl enable iptables
重启iptables服务
systemctl restart iptables.service
再次执行保存命令,成功
[root@localhost ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
31-1.解决service iptables save出错的更多相关文章
- 解决service iptables save出错please try to use systemctl
# service iptables save The service command supports only basic LSB actions (start, stop, restart, t ...
- 解决 service iptables save 报错 please try to use systemctl
本文档根据 service iptables save 报错 please try to use systemctl 提供解决方案.报错 [root@Jaking ~]# service iptabl ...
- 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 ...
- 新装云服务器没有iptables 文件,并且无法通过service iptables save操作
在安装zookeeper时,需要放开端口2181 按照视频教程在 /etc/sysconfig/ 下对iptables 文件进行编辑,但是该目录下没有此文件 通过强行写iptables -P OUT ...
- 解决 service iptables start 无法启动的问题
解决方式: iptables -F // 初始化iptables. service iptables save // 保存 service iptables restart // 重启
- centos7 中没有service iptables save指令来保存防火墙规则
解决方法: systemctl stop firewalld 关闭防火墙yum install iptables-services 安装 iptables 服务systemctl enable ip ...
- centos7中没有service iptables save指令来保存防火墙规则
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- centos 7 中没有iptables 和service iptables save 指令使用失败问题解决方案
1.任意运行一条iptables防火墙规则配置命令: iptables -P OUTPUT ACCEPT 2.对iptables服务进行保存: service iptables save 如果上述命令 ...
- centos7 service iptables save 报错
解决办法: 1.systemctl stop firewalld 2.yum install iptables-services 3.systemctl restart iptables 4.ser ...
随机推荐
- Java通过jni调用动态链接库
(1)JNI简介 JNI是Java Native Interface的缩写,它提供了若干的API实现了Java和其他语言的通信(主要是C&C++).从Java1.1开始,JNI标准成为java ...
- Jmeter(三十四) - 从入门到精通进阶篇 - 参数化(详解教程)
1.简介 前边三十多篇文章主要介绍的是Jmeter的一些操作和基础知识,算是一些初级入门的知识点,从这一篇开始我们就来学习Jmeter比较高级的操作和深入的知识点了.今天这一篇主要是讲参数化,其实前边 ...
- mysql 创建[序列],功能类似于oracle的序列
参考自菜鸟教程 https://www.runoob.com/mysql/mysql-using-sequences.html 使用函数创建自增序列管理表(批量使用自增表,设置初始值,自增幅度) 第一 ...
- Git之pull,fetch差别
简言之, pull=fetch+merge,下拉远程分支并与本地分支合并. fetch只是下拉远程分支,怎么合并,可以自己再做选择. 进一步了解是,git本地有暂存区(亦称为Index区) fetch ...
- tree 中文(转)
原文:http://www.dutor.net/index.php/2009/05/tree-cn-code/ 简介: tree命令可以以目录树的形式显示指定(默认显示这个文件系统)目录的所有文件夹和 ...
- ThreadX应用笔记:内核初始化和任务调度
作者:zzssdd2 E-mail:zzssdd2@foxmail.com 一.前言 了解ThreadX的初始化流程有助于移植使用,掌握任务的的调度有助于更加得心应手地运用该实时操作系统. 二.初始化 ...
- 【老孟Flutter】为什么 build 方法放在 State 中而不是在 StatefulWidget 中
老孟导读:此篇文章是生命周期相关文章的番外篇,在查看源码的过程中发现了这一有趣的问题,欢迎大家一起探讨. Flutter 中Stateful 组件的生命周期:http://laomengit.com/ ...
- 010_MySQL
目录 初识MySQL 为什么学习数据库 什么是数据库 数据库分类 MySQL简介 Windows安装MySQL 安装建议 软件下载 安装步骤 安装SQLyog 下载安装 连接数据库 简单操作 命令行连 ...
- 爬虫-urllib模块的使用
urllib是Python中请求url连接的官方标准库,在Python3中将Python2中的urllib和urllib2整合成了urllib.urllib中一共有四个模块,分别如下: request ...
- LeetCode 二分查找模板 III
模板 #3: int binarySearch(vector<int>& nums, int target){ if (nums.size() == 0) return -1; i ...