Configuring time sync with chronyd

You can configure your machine to time sync with another machine using chronyd.

  1. In the /etc/crony.conf file, update the lines that start with the word server by 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 
  2. If chronyd is already running and you would like changes to take effect, use the following command:
    #systemctl restart chronyd.service
  3. If you would like NTP to start automatically on restart, type:
    #systemctl enable chronyd.service 

    This takes effect after the next reboot. To start without rebooting, type:

    #systemctl start chronyd.service

    The 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.

  4. To check on the status of chronyd, type:
    # chronyd sources -v

    The first character before the server host is * when it is time synced.