Closed. This question is off-topic。它当前不接受答案。
                            
                        
                    
                
                            
                                
                
                        
                            
                        
                    
                        
                            想改善这个问题吗? Update the question,所以它是on-topic,用于堆栈溢出。
                        
                        2年前关闭。
                                                                                            
                
        
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


我已经在网上查找并没有看到可以安装initctl的任何yum软件包。你能帮忙吗?

最佳答案

CentOS 7附带了systemctl来管理服务。您不需要使用initctl。

service autofs restart应指向systemctl restart autofs

您可以使用systemctl status autofs检查此服务的状态,如果无法重新启动,请向我们发布输出。

10-08 05:52