1.服务端配置

[root@centos-151 ~]# yum install chrony
[root@centos-151 ~]# vim /etc/chrony.conf
# 添加如下1行
server s1b.time.edu.cn       iburst
# 解注释并修改如下2行
allow 192.168.46.0/24
local stratum 10
[root@centos-151 ~]# systemctl restart chronyd
[root@centos-151 ~]# netstat -tunlp |grep ch
udp        0      0 0.0.0.0:123             0.0.0.0:*                           21886/chronyd
udp        0      0 127.0.0.1:323           0.0.0.0:*                           21886/chronyd
udp6       0      0 ::1:323                 :::*                                21886/chronyd

2.客户端配置

[root@centos-158 ~]# yum install chrony
[root@centos-158 ~]# vim /etc/chrony.conf
# 添加行
server 192.168.46.151 iburst
# 删除其它server 行

[root@centos-158 ~]# systemctl restart chronyd

3.客户端测试

[root@centos-158 ~]# chronyc  sources  -V
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^? 192.168.46.151                0   8     0     -     +0ns[   +0ns] +/-    0ns
[root@centos-158 ~]# date
Mon Mar  5 09:59:02 CST 2018

4.window客户端配置

在 Windows 上,您可以在 PowerShell 或命令提示符下运行以下命令:

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:"192.168.46.151"
w32tm /config /reliable:yes
net start w32time

致谢

时间服务器
利用 Amazon Time Sync Service 保持时间同步

相关文章:

  • 2022-01-21
  • 2022-12-23
  • 2021-12-01
  • 2022-02-24
  • 2021-10-29
  • 2022-12-23
  • 2021-08-06
猜你喜欢
  • 2022-02-05
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-04-23
  • 2022-02-28
相关资源
相似解决方案