HADOOP ntp时区同步
安装ntp服务器
sudo yum install ntp
启动
systemctl start ntpd
开机自启动
systemctl enable ntpd
查看状态
systemctl status ntpd
时钟同步
ntpdate -u ntp.aliyun.com
cp /etc/ntp.conf /etc/ntp.conf.backup
sudo vi /etc/ntp.conf
hadoop 主节点(hostname=hadoop01)
server ntp.aliyun.com prefer
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
hadoop 副节点
server hadoop01
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
如果没有配置hosts文件,用主节点ip地址(例如192.168.1.128是自己的ip地址)代替hadoop01
ip addr 可以查看ip地址
systemctl restart ntpd
hadoop 主节点
ntpdate -u ntp.aliyun.com
hadoop 副节点
ntpdate -u hadoop01
date查看时间

浙公网安备 33010602011771号