NTP时钟同步
centos首先安装NTP服务
yum isntall -y ntp
安装完成后,配置ntp配置文件
vi /etc/ntp.conf
使用阿里云NTP服务器作为时钟源
server ntp1.aliyun.com
启动NTP服务器
service ntpd start
同步时间
ntpdate master
查看同步结果
ntpq -p
[root@kvm ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*120.25.115.20 10.137.53.7 2 u 46 64 177 46.107 25.673 16.683
remote: 远端时钟源地址;
refid: 参考上一次时钟地址;
st:stratum阶层;
when:多少秒以前同步过
poll:下次更新在多少秒后
reach:已经向上层ntp服务器要求更新的次数
delay:网络延迟
offset:时间补偿 重点关注!
jitter:系统时间与bios时间差
[root@tcp-dump-2 ~]# timedatectl Local time: Tue 2020-10-13 23:17:55 CST Universal time: Tue 2020-10-13 15:17:55 UTC RTC time: Tue 2020-10-13 15:17:55 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: no NTP synchronized: no RTC in local TZ: no DST active: n/a [root@tcp-dump-2 ~]# timedatectl set-ntp yes [root@tcp-dump-2 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== 120.25.115.20 10.137.53.7 2 u 15 64 1 92.365 9.387 0.000 [root@tcp-dump-2 ~]# [root@tcp-dump-2 ~]# [root@tcp-dump-2 ~]# date Tue Oct 13 15:18:56 CST 2020 [root@tcp-dump-2 ~]# timedatectl status Local time: Tue 2020-10-13 15:19:09 CST Universal time: Tue 2020-10-13 07:19:09 UTC RTC time: Tue 2020-10-13 15:19:09 Time zone: Asia/Shanghai (CST, +0800) NTP enabled: yes NTP synchronized: no RTC in local TZ: no DST active: n/a [root@tcp-dump-2 ~]#

浙公网安备 33010602011771号