小编j9d*_*9dy的帖子

如何在ubuntu上设置没有互联网访问权限的本地ntp服务器?

我已经尝试了几个关于如何在 ubuntu 上设置本地 ntp 服务器的指南,但似乎没有一个可以正常工作。由于某种原因,我的服务器在时间上严重漂移,我必须将它们的时间保持在一起,因为我运行的数据库需要这样做。

  • 我有 8 个 ubuntu 14.04 LTS 服务器,没有一个可以访问互联网
  • 我想在其中一台(或多台,如果更好的话)服务器上运行 ntp 服务器,并让所有其他服务器连接到 ntp 服务器以设置时间

目前,我的服务器(ip .24)运行这个 /etc/ntp.conf:

server 127.127.1.0 prefer
fudge  127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008

# Give localhost full access rights
restrict 127.0.0.1

# Give machines on our network access to query us
restrict 192.168.178.0 mask 255.255.255.0 nomodify notrap

broadcast 192.168.178.0
Run Code Online (Sandbox Code Playgroud)

而在“客户”上:

# Point to our network's master time server
server 192.168.178.24 iburst
fudge 192.168.178.24  stratum 10

restrict default ignore
restrict ::1
restrict 127.0.0.1 …
Run Code Online (Sandbox Code Playgroud)

ubuntu ntp time-synchronization ntpd ntpdate

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

ntp ×1

ntpd ×1

ntpdate ×1

time-synchronization ×1

ubuntu ×1