CDH 5 时钟服务器配置

来源:互联网 发布:multisim单片机继电器 编辑:程序博客网 时间:2024/06/05 11:47
       不得不说 CDH版本的hadoop 虽然再安装上提供了方便,但是在前期的准备工作上得做足充分的准备,才能保证你安装 的集群不出问题。因工作需要,最近一直也在研究CDH,在诸多尝试之后终于安装成功了。由于自己一时的苟且偷懒,遗留了一些小问题,就是时钟服务器的问题。装过CM的都知道,在安装CM 的时候,有一个时钟检查,这项不通过,你是无法进行下去的,当时偷懒,未设置ntp 服务器配置,只是简单的将所有服务器时间设置为同样的,时差不超过俩秒,这样检查时虽然会通过,CM界面还是会有红色警告。对于有强迫症的我来说,实在是不能忍的,于是动手拔了这眼中钉。废话不多说,下面是配置:

           首先选一台当作时钟服务器(ntp server),配置

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1

restrict default ignore
restrict 127.0.0.1
restrict 172.16.184.0 mask 255.255.255.0 notrap nomodify  //允许这个网段所有ip 同步
server  127.127.1.0  //server IP 地址 ,如果没有找到,与LOCAl 同步
fudge   127.127.1.0 stratum 8

其中参数请参考:  http://blog.csdn.net/wzyzzu/article/details/46515129

具体细节请参考:  http://www.aboutyun.com/thread-11395-1-1.html


          其他服务器配置(server client)

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
#restrict 127.0.0.1
restrict -6 ::1

restrict default ignore
restrict 172.16.184.0 mask 255.255.255.0 notrap nomodify  //允许这个网段所有ip 同步
server  172.16.184.11  //server IP 地址 ,只允许与主机同步
fudge   172.16.184.11 stratum 8

然后启动ntp服务,service ntpd start ,等待5 分钟,刷新CM 界面,警告消失,配置成功

以上为个人理解,欢迎各位批评指正
0 0
原创粉丝点击