linux ntp 同步windows 时间服务器
原由:客户想安装rac的linux机器的时间能够同步使用应用服务的外部windows机器。
ntp客户端linux 6.5
windows服务端2003 (2008也可以)
windows服务器
1.修改以下选项的键值
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer内的[Enabled]
设定为1。
2.修改键值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags设定为5.
3.修改键值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type内的[Type]
设定为NTP。
4.cmd 输入“net stop w32time”、“net start w32time”。
------------------------------------------------------------------------------------
linux客户端
ntpdate 172.24.160.112
可以搞成计划任务
crontab -l
0 22 * * * /usr/sbin/ntpdate 172.24.160.112 每天22点同步