①本地时钟服务器需要安装chrony服务,可以通过yum、rpm、源码包安装,chrony支持C/S模式
②编辑本地时钟服务,使其指向提供标准时间服务器,例如:中国国家授时中心NTP服务器。
修改配置文件/etc/chrony.conf,
server 210.72.145.44 iburst (210.72.145.44为中国国家授时中心NTP服务器,可以填写域名)
并重启服务,systemctl restart chronyd.service
③通过chronyc sources -v 查看是否同步时钟服务
210 Number of sources = 1
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| / xxxx = adjusted offset,
|| Log2(Polling interval) -. | yyyy = measured offset,
|| \ | zzzz = estimated error.
|| | |
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? 210.72.145.44 0 6 0 10y +0ns[ +0ns] +/- 0ns
④编辑本地其他服务器,使其时钟同步与本地时钟服务器,步骤同上。