本地搭建hadoop集群--ntp同步集群时间

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_18730505/article/details/81098884

使用ntp对外提供服务器集群时间同步

一般选择masterzu作为ntp服务器

首先检查机器是否 安装ntp

rpm -qa|grep ntp

如果安装则编辑文档如下操作 保存退出

vim /etc/ntp.conf

第一个圈 取消注释

第二个圈全部注掉

第三个自己加上去

修改/etc/sysconfig/ntpd 文件

扫描二维码关注公众号,回复: 4352584 查看本文章


vim /etc/sysconfig/ntpd


增加内容如下,退出并保存

SYNC_HWCLOCK=yes

重新启动 ntpd

service ntpd start

chkconfig ntpd on

其他机器在root目录下创建 调度任务

crontab -e

* */1 * * * /usr/sbin/ntpdate master

指定 1小时 同步以下时间

猜你喜欢

转载自blog.csdn.net/qq_18730505/article/details/81098884