HaDoop集群时间不同步的处理方法

集群时间不同步,会导致各种各样的Bug发生。下面介绍一种一劳永逸的方法

常规的有

date -s '2018-8-15 16:03'

或者ntpdate 0.asia.pool.ntp.org

这些命令来解决,但是过一段时间后,时间又会不同步

解决方法:

yum install -y ntp

构建一个定时器

命令行输入 crontab -e

新增一行 
* * * * * /usr/sbin/ntpdate 0.asia.pool.ntp.org

意思每隔一分钟校对一次时间,注意命令必须采用安装目录/命令的写法

猜你喜欢

转载自blog.csdn.net/qq_39184715/article/details/81975738
今日推荐