配置集群的时区同步
大数据系统是对时间敏感的计算处理系统,时间同步是基础保障,是大数据得以发挥作用的技术支撑,所以需要保证所有机器时间同步!
- 1、确认是否安装过ntp: rpm -qa | grep ntp,若有的话使用:yum -y remove 相关文件名命令卸载
- 2、安装ntp: yum -y install ntp
- 3、修改所有节点的ntp配置文件: vi /etc/ntp.conf,添加如下内容:
#当前节点IP地址
restrict 192.168.206.33 nomodify notrap nopeer noquery
#集群所在网段的网关(Gateway),子网掩码(Genmask)
restrict 192.168.206.1 mask 255.255.255.0 nomodify notrap
- 4、选择一个hadoop001作为主节点,修改其/etc/ntp.conf: vi /etc/ntp.conf,内容如下(server需要全部注释):
server 127.127.1.0
Fudge 127.127.1.0 stratum 10