如何配置NTP时间客户端

要求:

配置你的系统,使其成为classroom.example.com的NTP客户端。

图片[1]-如何配置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  #带*代表同步成功
© 版权声明
THE END
喜欢就支持一下吧
点赞71赞赏 分享
评论 抢沙发
头像
欢迎光临不念博客,留下您的想法和建议,祝您有愉快的一天~
提交
头像

昵称

取消
昵称

    暂无评论内容