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
你贼6!