NTPserver:192.168.0.102
1.#rpm -ivh ntp*.rpm #安装ntp软件
2.#vi /etc/ntp.conf #修改配置文件:见文后(附)
......
3.#service ntpd start #启动ntpd服务
#chkconfig --level 3 ntpd on #开机自动启动
#echo "00 7,19 * * * root /etc/init.d/ntpd restart; /sbin/hwclock -w" >>/etc/crontab
......10-15minutes...... #等待10到15分钟
#ntpq -p #检测ntp服务状态 * 表示目前选择的主同步服务器
*202.112.10.60 .GPS.. 1 u 6 64 77 505.943 15.738 33.965
LOCAL(0) .LOCL. 10 l 65 64 37 0.000 0.000 0.001
#OK...
linux-client:
1.#chkconfig --level 234 ntpd off
#service ntpd stop
#/usr/sbin/ntpdate 192.168.0.102 ;/sbin/hwclock -w
2.#echo "00 8,20 * * * root /usr/sbin/ntpdate 192.168.0.102 ;/sbin/hwclock -w" >>/etc/crontab
windows-client:
1.修改注册表如下:(过12个小时同步一次)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient]
"SpecialPollInterval"=dword:00015180(十六进制)
2.cmd下运行如下命令:
net time /setsntp:192.168.0.102
net stop w32time
net start w32time
exit