windows 2008 r2 NTP同步Internet时间配置

一、 NTP Client同步Internet时间

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

开始菜单---运行输入gpedit.msc打开本地组策略

 windows 2008 r2 NTP同步Internet时间配置 随笔 第1张

 

 windows 2008 r2 NTP同步Internet时间配置 随笔 第2张

 

在打开本地组策略,再依次点击“计算机配置”---“管理模板”---“系统”---“windows时间服务”

 windows 2008 r2 NTP同步Internet时间配置 随笔 第3张

 

进入“时间提供程序”目录,配置Windows NTP客户端。

 

 windows 2008 r2 NTP同步Internet时间配置 随笔 第4张

 

 windows 2008 r2 NTP同步Internet时间配置 随笔 第5张

 

启用Windows NTP客户端

 windows 2008 r2 NTP同步Internet时间配置 随笔 第6张

windows 2008 r2 NTP同步Internet时间配置 随笔 第7张

 

更新组策略,使之生效!

cmd下,输入命令:gpupdate /force

 windows 2008 r2 NTP同步Internet时间配置 随笔 第8张

 

 二、 修改注册表,以提高时间同步精度

“运行”下输入“regedit”进入注册表

 windows 2008 r2 NTP同步Internet时间配置 随笔 第9张

 

依次点击HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

windows 2008 r2 NTP同步Internet时间配置 随笔 第10张

 

 

 

双击 SpecialPollInterval 键值,将对话框中的“基数栏”选择到“十进制”上,对话框中显示的数字正是自动对时的间隔(以秒为单位),比如默认的604800就是由7(天)×24(时)×60(分)×60(秒)计算来的。设定时间同步周期(建议设为900=15分钟或3600=1小时等周期值),填入对话框,点击确定保存关闭对话框。 

 windows 2008 r2 NTP同步Internet时间配置 随笔 第11张

 

 

在Parameters列表中,将NtpServer键值修改为,可以使用默认,或者你有时间服务器然后点击“确定”按钮保存。

 windows 2008 r2 NTP同步Internet时间配置 随笔 第12张

 

本次使用的是阿里云的时间服务器:time1.aliyun.com

 windows 2008 r2 NTP同步Internet时间配置 随笔 第13张

 

cmd下重启w32time服务:

net stop w32time & net start w32time

 

同步时间:

w32tm   /resync    就能够更新时间了

 

因为时差太大,无法同步时间

 windows 2008 r2 NTP同步Internet时间配置 随笔 第14张

 

检查HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

下的MaxPosPhaseCorrection和MaxNegPhaseCorrection,发现value =54000(10进制),一换算发现才12个小时,这远远不够,有的时候需要1个月呢,于是把value改为100,0000,够了。否则:此计算机没有重新同步,因为要求的时间更改太大。

 windows 2008 r2 NTP同步Internet时间配置 随笔 第15张

 

更新下时间同步服务器

 windows 2008 r2 NTP同步Internet时间配置 随笔 第16张

 

 windows 2008 r2 NTP同步Internet时间配置 随笔 第17张

 

完成!

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄