参考:
服务器端操作:
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
阅读(3805) | 评论(0) | 转发(0) |