大数据程序员

大数据||hadoop集群的时间同步

2018-02-23  本文已影响146人  明明德撩码

各大银行、证券、通讯集群内部时间同步,找一台机器作为时间基准,其他机器同步一次时间。

时间服务器配置

检测是否安装ntp工具

rpm -qa|grep ntp


修改vi /etc/ntp.conf

Please consider joining the pool
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org

开启主同步时钟

在此文件中新增: SYNC_HWCLOCK=yes


service ntpd start


chkconfig ntpd on

被同步的服务节点(132/133节点服务器)编写时间同步脚本(计划任务)

linux|计划任务

-crontab -e
0-59/10 * * * * /usr/sbin/ntpdate hadoop-senior.beifeng.com
说明:每10分钟在131服务器上同步一次时间。


133服务器
132服务器
上一篇下一篇

猜你喜欢

热点阅读