――What is chrony?
NTP client installed as standard in CentOS 7(Up to CentOS6, ntpd was installed)
There are differences, but
chrony :Useful in environments where constant communication with the NTP server is not possible, such as virtual impressions
ntp :Useful in an environment where you can always communicate with the NTP server
--Installation
$ sudo yum install chrony
Loaded plugin:fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp-srv2.kddilabs.jp
 * extras: ftp-srv2.kddilabs.jp
 * updates: ftp-srv2.kddilabs.jp
Package chrony-3.4-1.el7.x86_64 is installed or latest version
Do nothing
It is installed by default and seems to be the latest version.
--Change configuration file
$ sudo vi /etc/chrony.conf 
#Comment out
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
#add to
server ntp.jst.mfeed.ad.jp iburst
server ntp.nict.jp iburst 
--Restarting chrony
$ sudo systemctl restart chronyd
--Synchronization confirmation
$ chronyc sources
210 Number of sources = 2
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^- ntp1.jst.mfeed.ad.jp          2   6    17     7  -1686us[-1785us] +/-   61ms
^* ntp-k1.nict.jp                1   6    17     7    -84us[ -183us] +/-   10ms
^ represents the server
- is an acceptable server
* Is the server currently in sync
--Check the time
$ date
Tuesday, September 1, 2020 21:00:25 JST
-Using CHRONY -[Linux] Time synchronization setting and operation procedure by Chrony [Chronyd] -I adjusted the time dilation with CentOS 7
Recommended Posts