Use the date command to view the current date and time the server has.
date . . . Mon Jan 01 00:01:01 CDT 2016
Use apt-get or yum to install Chrony.
apt-get install chrony yum install chrony
In the /etc/chrony.conf file, configure the server to allow client PCs in the subnet to connect to the server. In this example, the server is configured to allow PCs in the 192.168.0.0/24 network.
Also ensure the four server directives are not commented out. Replace "distro" with a Linux distro, such as CentOS, Ubuntu, or Fedora.
server 0.distro.pool.ntp.org iburst server 1.distro.pool.ntp.org iburst server 2.distro.pool.ntp.org iburst server 3.distro.pool.ntp.org iburst
The ps command can be used to determine if your system is using init or systemd. If PID 1 is init, then you will use the service command. If PID 1 is systemd, then you will use the systemctl command.
If your system is using systemd, use the systemctl command to start and enable chronyd.
systemctl enable chronyd systemctl start chronyd systemctl status chronyd
chkconfig chronyd on service chronyd start service chronyd status
Use the chronyc sources command to verify that chrony is able to connect to external NTP servers.
chronyc sources . . . 210 Number of sources = 4MS Name/IP address Stratum Poll Reach LastRx Last sample ============================================================================= ^* example.com 2 10 377 160 +5942us[-1824us] +/- 48ms ^+ example.com 1 8 377 193 -23ms[- 30ms] +/- 56ms ^+ example.com 2 10 377 29m +6399us[+7465us] +/- 71ms ^+ example.com 2 10 363 49 +6380us[-6380us] +/- 35ms
Use the chronyc tracking command to verify that the machine is synchronized. If Leap status is “normal”, the machine is synchronized. On the other hand, if leap status is “not synchronized”, the machine is not synchronized.
chronyc tracking . . . Leap status : Normal
Use the date command to verify the server is getting the correct date and time from the NTP pool.
date . . . Mon Jan 01 08:30:01 CDT 2017
It is important to recognize that some time zones use both Standard Time and Daylight Savings Time. In the prior output, the date and time is in Central Daylight Time (CDT). When Daylight Savings Time is not being observed, the date and time should be in Central Standard Time (CST). In this time zone, CDT is 5 hours behind Coordinated Universal Time (UTC), and CST is 6 hours behind Coordinated Universal Time (UTC). Daylight Savings Time is generally observed from early March to early November, and Standard Time is generally observed from early November to early March.
Other computers can now use the Chrony server for time management.