xiaolmail
新新人类
帖子
8
精华
0
无忧币 1
积分 10
阅读权限 20
|
发表于:2008-6-24 11:41
标题:Linux NTP Server 配置
<上一帖 |
下一帖>
NTPServer:192.168.3.204从Internet校准时间并向内部(192.168.3.0/24)提供校对
NTPServer:192.168.3.204
1.
#rpm -ivh ntp*.rpm #安装ntp软件
2.
#vi /etc/ntp.conf #修改配置文件:见文后(附)
3.
#service ntpd start #启动ntpd服务
#chkconfig --level 3 ntpd on #开机自动启动
#echo "40 7 * * * 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
#ntpdate 192.168.3.204
2.
#echo "10 8 * * * root /usr/sbin/ntpdate 192.168.0.204; /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.204
net stop w32time
net start w32time
(附):
#less /etc/ntpd.conf
driftfile /var/lib/ntp/drift
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict -6 ::1
restrict 192.168.0.0 mask 255.255.255.0 nomodify notrap
server 202.112.10.60
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
希望和大家共同学习。。。
|
 网络虽虚拟,技术无边界,来看看大家“真面目”! |
|