Windows2008R2对时服务配置手册

一、NTP服务器创建

  1. NTP服务器与交易所对时

NTP服务器与交易所对时使用交易所提供的ezNTP对时工具对时,ezNTP对时工具加入系统自启动。

  1. Windows 2008 NTP服务启动
  1. 修改以下选项的键值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\

Services\W32Time\TimeProviders\NtpServer内的[Enabled]设定为1。
  打开NTP服务器功能(默认是不开启NTP Server服务)。

B.   修改以下键值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

W32Time\Config\AnnounceFlags设定为5.
 该设定强制主机将它自身宣布为可靠的时间源。

C.  修改HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

W32Time\Parameters\Type内的[Type]设定为NTP。

D.  在windows服务里面将windows time服务启动类型改为自动,将状态改为启动。

二、linux服务器客户端对时

  1.如果操作系统自带ntpd服务,并且已启动,需手工关闭ntpd服务自启动,且停止服务。否则在执行ntpdate命令的时候会报错。关闭系统服务命令如下:

     chkconfig ntpd off    #关闭ntpd开机自启动服务

     service ntpd off      #停止ntpd服务

2.将ntpdate对时命令加入计划任务

使用crontab –e 添加30 7 * * 1-5 ntpdate 192.168.141.25 #每周一至周五7:30定时执行对时任务

  • windows服务器客户端对时
  1. 创建对时脚本

要实现Windows服务器定时与NTP服务器对时,需要通过计划任务来实现,故需要写一个对时脚本 (这不是图标,是批处理文件,可通过复制提取)。将对时脚本添加到计划任务里面,每天定时执行即可。

ntp type.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"NtpServer"="time.windows.com,0x8"
"ServiceDll"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,\
  00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
  77,00,33,00,32,00,74,00,69,00,6d,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
"ServiceDllUnloadOnStop"=dword:00000001
"ServiceMain"="SvchostEntry_W32Time"
"Type"="NTP"

ntp config.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config]
"AnnounceFlags"=dword:00000005
"ClockAdjustmentAuditLimit"=dword:00000320
"ClockHoldoverPeriod"=dword:00001e78
"EventLogFlags"=dword:00000002
"FrequencyCorrectRate"=dword:00000004
"HoldPeriod"=dword:00000005
"LargePhaseOffset"=dword:02faf080
"LastKnownGoodTime"=hex(b):30,3d,bb,d6,80,e1,d5,01
"LocalClockDispersion"=dword:0000000a
"MaxAllowedPhaseOffset"=dword:0000012c
"MaxNegPhaseCorrection"=dword:ffffffff
"MaxPollInterval"=dword:0000000a
"MaxPosPhaseCorrection"=dword:ffffffff
"MinPollInterval"=dword:00000006
"PhaseCorrectRate"=dword:00000001
"PollAdjustFactor"=dword:00000005
"SpikeWatchPeriod"=dword:00000384
"TimeJumpAuditOffset"=dword:00007080
"UpdateInterval"=dword:00000064
"UtilizeSslTimeData"=dword:00000001

ntp enable.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer]
"AllowNonstandardModeCombinations"=dword:00000001
"ChainDisable"=dword:00000000
"ChainEntryTimeout"=dword:00000010
"ChainLoggingRate"=dword:0000001e
"ChainMaxEntries"=dword:00000080
"ChainMaxHostEntries"=dword:00000004
"DllName"=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
  74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,\
  00,33,00,32,00,74,00,69,00,6d,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
"Enabled"=dword:00000001
"EventLogFlags"=dword:00000000
"InputProvider"=dword:00000000
"RequireSecureTimeSyncRequests"=dword:00000000

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

@David Liu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值