这里以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 本文最后记录时间 2023-04-02
文章链接地址:https://wojc.cn/archives/88.html
本站文章除注明[转载|引用|来源|来自],均为本站原创内容,转载前请注明出处
文章链接地址:https://wojc.cn/archives/88.html
本站文章除注明[转载|引用|来源|来自],均为本站原创内容,转载前请注明出处
你贼6!