下载软件
安装软件
修改配置文件
安装完成软件后,参考下面配置文件配置你的 NTP 服务器地址。
配置文件
# NTP Network Time Protocol
# **** ATTENTION ****: *You have to restart the NTP service when you change this file to activate the changes*
# PLEASE CHECK THIS FILE CAREFULLY AND MODIFY IT IF REQUIRED
# Configuration File created by Windows Binary Distribution Installer Rev.: 1.27 mbg
# please check http://www.ntp.org for additional documentation and background information
# restrict access to avoid abuse of NTP for traffic amplification attacks
# see http://news.meinberg.de/244 for details
#restrict default noquery nopeer nomodify notrap
#restrict -6 default noquery nopeer nomodify notrap
# allow status queries and everything else from localhost
restrict 192.168.1.0 mask 255.255.255.0 nomodify # 为该网段 192.168.1.0 提供NTP服务
# if you need to allow access from a remote host, you can add lines like this:
# restrict <IP OF REMOTE HOST>
# Use drift file
driftfile "C:\Program Files (x86)\NTP\etc\ntp.drift"
# your local system clock, could be used as a backup
# (this is only useful if you need to distribute time no matter how good or bad it is)
server 127.127.1.0 # 使用本机作为时钟源
# but it should operate at a high stratum level to let the clients know and force them to
# use any other timesource they may have.
fudge 127.127.1.0 stratum 12
# End of generated ntp.conf --- Please edit this to suite your needs
启动服务
关闭软件同理管理员权限执行 Stop NTP Service
。
问题
1.启动NTP服务后不能同步时间?
使用 Quick NTP Status
查看 NTP 服务器状态,启动 NTP 服务后需要等待 LOCAL(0) 变为 *LOCAL(0) , Client 才能和 NTP 服务器进行时间同步,在此期间 Client 进行同步会出现 no server suitable for synchronization found
错误。
参考
ntp server 软件下载地址
https://www.meinbergglobal.com/english/sw/ntp.htm
一些错误的解决方法
https://www.cnblogs.com/suncoolcat/p/3306476.html