Chinaunix首页 | 论坛 | 博客
  • 博客访问: 10503054
  • 博文数量: 2905
  • 博客积分: 20098
  • 博客等级: 上将
  • 技术积分: 36298
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 05:00
文章存档

2012年(1)

2011年(3)

2009年(2901)

分类: LINUX

2009-03-23 11:16:25

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
阅读(985) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~