要求:
配置你的系统,使其成为classroom.example.com的NTP客户端。
![图片[1]-如何配置NTP时间客户端-编程社](https://cos.bianchengshe.com/wp-content/uploads/2023/09/image-75.png?imageMogr2/format/webp/interlace/1/quality/100)
首先我们需要编辑/etc/chrony.conf文件
[root@bianchengshe ~]# 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@bianchengshe ~]# systemctl restart chronyd.service #重启服务
[root@bianchengshe ~]# 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 #带*代表同步成功
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容