Configuring time sync with
chronyd
You can configure your machine to time sync with another machine using
chronyd.
-
In the /etc/crony.conf file, update the lines that start with the
word
serverby removing the default server lines and adding your own. For example:# configure the servers for synchronization using ip address or name server 198.102.75.10 iburst server 0.centos.pool.ntp.org iburst -
If
chronydis already running and you would like changes to take effect, use the following command:#systemctl restart chronyd.service -
If you would like NTP to start automatically on restart, type:
#systemctl enable chronyd.serviceThis takes effect after the next reboot. To start without rebooting, type:
#systemctl start chronyd.serviceThe system takes 15 minutes to sync the time. If the times are more than 10 minutes apart, NTP assumes there is an error and does not change the time.
-
To check on the status of
chronyd, type:# chronyd sources -vThe first character before the server host is
*when it is time synced.
