文本版|topic 高级搜索
   名人堂 帮助 论坛制度 意见反馈 | 首页 博客 周新贴 专题 求职 读书
RSS 底部
 
社区导航: 专家门诊   网络技术   操作系统   数据库   程序设计   系统应用   考试认证   CIO及信息化   站长交流   综合交流   下载基地  51CTO产品服务 设为首页 | 收藏本站
51CTO技术论坛» Linux & Advanced Application » Linux NTP Server 配置       [ 打印]  [ 订阅]  [ 收藏]  [ 推荐给朋友]   [ 本帖文本页]

论坛跳转:
     
标题: [原创] Linux NTP Server 配置  ( 查看:237  回复:0 )   
  本主题被作者加入到他/她的 Blog 中  
 
xiaolmail
新新人类  点击可查看详细



帖子 8
精华 0
无忧币 1
积分 10
阅读权限 20
注册日期 2008-1-9
最后登录 2008-6-24 离线

[查看资料]  [发短消息]  [Blog
       
发表于: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

希望和大家共同学习。。。



网络虽虚拟,技术无边界,来看看大家“真面目”!
2008-6-24 11:411楼
[ 顶部 ]
     
论坛跳转:  

| | |

标记已读 · 删除论坛Cookies · 文本版 · WAP
 
| 诚征版主 | 版主堂 | 意见建议 | 大史记 | 论坛地图
Copyright©2005-2008 51CTO.COM  Powered by Discuz!
本论坛言论纯属发布者个人意见,不代表51CTO网站立场!如有疑义,请与管理员联系。
京ICP备05051492号