service autofs restart Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service autofs restart /etc/init.d/autofs: line 54: initctl: command not found 我在网上搜索了一下,没有发现任何yum包可以安装initctl,请问你能帮忙吗?
CentOS 7自带systemctl来管理服务。您不需要使用initctl。 service autofs restart应该改为systemctl restart autofs 您可以使用systemctl status autofs检查此服务的状态,如果无法重新启动,请将输出发送给我们。