Linux系统自带ntp软件包,或者使用rpm命令安装此包。
172.16.19.149作为ntp服务器,172.16.19.0网段的都可以与149进行时钟同步。
若通过以下方法还是配置失败,请参考文档《NTP时间服务器配置.doc》
(1) 编辑配置文件/etc/ntp.conf
a) 14行 restrict 172.16.19.0 mask 255.255.255.0 nomodify notrap
b) 18行 server 172.16.l9.149
(2) 在mdss49上启动ntp服务器
service ntpd start
(3) 在服务器端验证
watch ntpq –p
(4) 在客户端验证
ntpdate –d 172.16.19.149 //5分钟后会完成时间同步
(5) 在每一台datanode上执行crontab –e ,添加以下内容:
*/15 * * * * /usr/sbin/ntpdate 192.168.0.149
其含义:每15分钟更新一次时间,使其与master上的时间一致。