Article Directory
foreword
The Linux server has set ntpd to start automatically at startup, but restarting the server ntpd does not start automatically
1. The reason why the NTP service setting fails to start automatically after booting
reason:
chrony服务与NTP服务冲突导致开机启动未生效
Two, the solution
-
Turn off the self-starting of the chrony service
#关闭chrony服务的自启动 systemctl disable chronyd.service
-
View the startup status of the chrony service
#查看chrony服务的启动状态设置(disabled代表关闭) systemctl is-enabled chronyd
-
Start the NTP service
systemctl start ntpd
-
View the startup status of the NTP service
systemctl status ntpd
-
Set the NTP service to start automatically at boot
systemctl enable ntpd
-
Restart the server to test whether the NTP service is normal and self-starting