音乐分享(自动连播):
So cold
Not my baby
Wicked Game
What Is Love
Once Upon a Time
The Heart Of The Ocean
靳闯博客 记录是一种习惯 、分享是一种态度
centos7中systemctl 对系统服务的控制
发表于 - | 分类 - 技术积累 | 标签 - Centos7
这里以iptables服务为例说明,systemctl和cenots6 service 是相同的
centos7上还是可以用service 这个命令的,比如一些源码包安装后的启动服务脚本


安装service命令
yum install initscripts

启动服务
systemctl start iptables.service

停止服务
systemctl stop iptables.service

重启服务
systemctl restart iptables.service

查看服务状态
systemctl status iptables.service

开机启动
systemctl enable iptables.service 

禁止开机启动
systemctl disable iptables.service

查看所有已启动的服务
systemctl list-units --type=service

查看开机启动服务列表
systemctl list-unit-files

查看某个服务开机是否启动
systemctl list-unit-files |grep iptables
iptables.service                       enabled 

本站文章除注明[转载|引用|原文]出处外,均为本站原生内容,转载前请注明出处 | 文章链接地址:https://me.jinchuang.org/archives/88.html

如果这篇文章帮助到了你,我感到十分荣幸!

记录 🐾 分享 👣 进步 💪 变强


留言内容

  1. J.C
    J.C Windows 10 Google Chrome 回复

    你贼6!

留言

顶部