要求:
配置你的系统,使其成为classroom.example.com的NTP客户端。
首先我们需要编辑/etc/chrony.conf文件
[root@bunian ~]# vim /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# Ignore stratum in source selection.
server classroom.exmaple.com iburst #这一行是我们要新添加的
stratumweight 0
配置完成,我们要重启一下服务
[root@bunian ~]# systemctl restart chronyd.service #重启服务
[root@bunian ~]# chronyc sources #进行同步
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^* classroom.example.com 8 6 77 51 +760us[ +867us] +/- 1458us #带*代表同步成功