为什么重启后ntpd服务没有自动启动? [英] Why ntpd service is not started automatically after reboot?

查看:66
本文介绍了为什么重启后ntpd服务没有自动启动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过 yum 安装 ntpd 后,我运行命令 systemctl enable ntpd.service 并重新启动计算机.在得到shell提示后,我运行 systemctl -a |.grep ntp ,我将 ntpd.service加载为无效死状态.如果我使用 systemctl start ntpd.service 手动启动它,则可以正常运行.这是为什么?如何确保重新启动后 ntpd.service 将启动并运行?

After I installed ntpd via yum I run the command systemctl enable ntpd.service and rebooted the computer. After I got the shell prompt I run systemctl -a | grep ntp and I got ntpd.service loaded inactive dead. If I start it manually using systemctl start ntpd.service it works fine. Why is that? How can I ensure the ntpd.service will be up and running after reboot?

推荐答案

这似乎是fedora的问题,有一个名为"chrony"的服务,该服务可防止ntpd服务在启动后启动.使用 yum 删除chrony后,启动后将启动ntpd服务.有关更多详细信息,您可以检查.

This appears to be an issue with fedora, there is a service named "chrony" which prevents ntpd service to start after boot. After removing chrony with yum, ntpd service is started after boot. For more details you can check this.

更新:您还可以禁用在端口123上运行的 chronyd ,然后ntpd将启动:

UPDATE: You can also disable the chronyd that runs on port 123 and then ntpd will start:

sudo systemctl disable chronyd
sudo systemctl start ntpd

这篇关于为什么重启后ntpd服务没有自动启动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆