服务器端操作:
1 编辑服务器端配置文件/etc/ntp.conf,内容如下:
server 10.29.x.x prefer ----注意,该处IP地址为实际服务器端IP地址
server 127.127.1.0 ----此处IP为一个特殊地址,不需改动.
broadcastclient
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
2 编辑/etc/rc.tcpip文件,使进程在小机启动时自动启动,去掉下面字段的注释
#start /usr/sbin/xntpd "$src_running"
3 启动xntp服务
startsrc -s xntpd
4 查看启动是否成功
lssrc -s xntpd
其他节点的操作:
1 编辑文件/etc/ntp.conf,内容如下:
broadcastclient
server 10.29.x.x
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
2 编辑/etc/rc.tcpip文件,使进程在小机启动时自动启动,去掉下面字段的注释
#start /usr/sbin/xntpd "$src_running"
3 启动xntp服务
startsrc -s xntpd
4 查看启动是否成功
lssrc -s xntpd
备注:
(1)可以启动xntpd服务后过5分左右手工同步,如果时间太短,服务没有完全启动则会报错.
(2)手动同步时间:
ntpdate 10.29.x.x
(3)
xntp启动状态实例如下:
#lssrc -ls xntpd
Program name: /usr/sbin/xntpd
Version: 3
Leap indicator: 11 (Leap indicator is insane.) =========>初始化未完成
Sys peer: no peer, system is insane =========>初始化未完成
Sys stratum: 16 =========>初始化未完成
Sys precision: -17
Debug/Tracing: DISABLED
Root distance: 0.000000
Root dispersion: 0.000000
Reference ID: no refid, system is insane =========>初始化未完成
Reference time: no reftime, system is insane =========>初始化未完成
xntpd服务器初始化完成后:
#lssrc -ls xntpd
Program name: /usr/sbin/xntpd
Version: 3
Leap indicator: 00 (No leap second today.)
Sys peer: 127.127.1.0
Sys stratum: 4
Sys precision: -17
Debug/Tracing: DISABLED
Root distance: 0.000000
Root dispersion: 0.885010
Reference ID: 127.127.1.0
Reference time: c6e1d5c0.f7506000 Mon, Sep 26 200x 10
(4)查询两小型机的时钟差:(在node1上执行)
timedc clockdiff node2_name
阅读(3980) | 评论(0) | 转发(0) |