免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1483 | 回复: 3
打印 上一主题 下一主题

请教linux下NTP同步方案,不知道是那里配置出了问题。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-10 12:45 |只看该作者 |倒序浏览
我有4台linux服务器,想拿其中一台做server,另外三台做client。
在server的ntp.conf中我配置了(不知还需要配别的?)

# Prohibit general access to this service.
#restrict default ignore

# --- NTP MULTICASTCLIENT ---
#multicastclient                        # listen on default 224.0.1.1
# restrict 224.0.1.1 mask 255.255.255.255 notrust nomodify notrap
# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
restrict 61.150.25.226 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.230 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.234 mask 255.255.255.252 notrust nomodify notrap
restrict 61.150.25.238 mask 255.255.255.252 notrust nomodify notrap
#restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap

在client的.ntp.conf中我配置了
# Prohibit general access to this service.
#restrict default ignore

# --- OUR TIMESERVERS -----
# or remove the default restrict line
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.

# restrict mytrustedtimeserverip mask 255.255.255.255 nomodify notrap noquery
# server mytrustedtimeserverip
server 61.150.25.226


之后我在client端
ntpdate 61.150.25.226
10 Nov 12:09:02 ntpdate[9105]: step time server 61.150.25.226 offset -272.656985 sec

/etc/init.d/ntpd restart
关闭 ntpd:[失败]
启动 ntpd:[  确定  ]

pgrep ntpd
9218

之后执行ntpq -p后总是报以下错误,不知那里问题
ntpq -p
127.0.0.1: timed out, nothing received
***Request timed out

各位老大帮帮忙吧,我还是个菜鸟级人物!

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
2 [报告]
发表于 2005-11-10 12:56 |只看该作者
/usr/share/doc/ntp*

论坛徽章:
0
3 [报告]
发表于 2005-11-10 12:58 |只看该作者
能说清楚一些吗?老大,谢了

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
4 [报告]
发表于 2005-11-10 13:05 |只看该作者
原帖由 障碍重重 于 2005-11-10 12:58 发表
能说清楚一些吗?老大,谢了



那个路径下的NTP的文档.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP