在RHEL 7或CentOS 7上,systemctl或systemd命令可以正常工作。我知道它在RHEL 6或CentOS 6中是行不通的。您能告诉我启动/停止服务的替代命令吗,例如:systemctl start iptables.service?
发布于 2017-11-29 05:30:15
在早期版本的RHEL中,使用service命令,如这里的文件中所解释的那样。
# service service_name start因此,在你的情况下:
# service iptables start您可以将start替换为restart、stop、status。
列出所有服务,包括:
# service --status-all发布于 2019-08-07 11:28:17
rhel 6和centos 6使用的是暴发户,而不是系统。仍然支持SysV (服务和chkconfig)。
查看/etc/init/中initctl和文件的文档
发布于 2020-07-21 19:18:49
RHEL6和CENTOS 6使用service命令来管理系统服务。从RHEL7开始,systemctl用于管理系统服务。
https://unix.stackexchange.com/questions/407647
复制相似问题