我知道你可以更新-rc.d -f服务删除(它基本上删除了rcX.d中的链接),但这样做会丢失服务的序列号(SXXservice,XX是序列号),使生活变得生动当您想要重新启用服务时更难.我也知道我可以重命名rcX.d中的链接,这样它们就不会以S开头(或者将它们移动到其他地方),但我想知道是否有一些“Debian批准的最佳实践”方法来做到这一点.
解决方法 查看update-rc.d手册页.名为Installing Init Script links的部分的第三段读取…A common system administration error is to delete the links with the thought that this will “disable” the service,i.e.,that this will prevent the service from being started. However,if all links have been deleted then the next time the package is upgraded,the package’s postinst script will run update-rc.d again and this will reinstall links at their factory default locations. The correct way to disable services is to configure the service as stopped in all runlevels in which it is started by default. In the System V init system this means renaming the service’s symbolic links from S to K.
最后两句话应该回答你的问题. 总结
以上是内存溢出为你收集整理的linux – 在Debian中禁用服务的推荐方法全部内容,希望文章能够帮你解决linux – 在Debian中禁用服务的推荐方法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)