Linux 为什么重新启动后ntpd服务不会自动启动?

Linux 为什么重新启动后ntpd服务不会自动启动?,linux,ntp,systemd,Linux,Ntp,Systemd,通过yum安装ntpd后,我运行命令systemctl enable ntpd.service并重新启动计算机。在得到shell提示符后,我运行systemctl-a | grep ntp,得到ntpd.service loaded inactive dead。如果我使用systemctl start ntpd.service手动启动它,它工作正常。为什么呢?如何确保ntpd.service在重新启动后启动并运行?这似乎是fedora的问题,有一个名为“chrony”的服务阻止ntpd服务在启动

通过
yum安装
ntpd
后,我运行命令
systemctl enable ntpd.service
并重新启动计算机。在得到shell提示符后,我运行
systemctl-a | grep ntp
,得到
ntpd.service loaded inactive dead
。如果我使用
systemctl start ntpd.service
手动启动它,它工作正常。为什么呢?如何确保
ntpd.service
在重新启动后启动并运行?

这似乎是fedora的问题,有一个名为“chrony”的服务阻止ntpd服务在启动后启动。使用
yum
删除chrony后,ntpd服务将在引导后启动。有关更多详细信息,请查看

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

sudo systemctl disable chronyd
sudo systemctl start ntpd

我使用CentOS 7也遇到了这个问题。