Hadoop3集群搭建之——配置ntp服务
上篇:
下篇:
安装好的的虚拟机,发现时间不一致,相差还比较大,对于hadoop集群来说,是需要时间同步的。
这个时候,就需要一个ntp服务了。
1、在各个节点上安装ntp
yum install ntp
2、在各个节点上设置时区为 亚洲上海
timedatectl set-timezone Asia/Shanghai
3、在各个节点启动ntp服务,依次执行以下命令
systemctl start ntpd
systemctl enable ntpd
4、在master上设置当前时间
timedatectl set-ntp no
timedatectl set-time HH:MM:SS
timedatectl set-ntp yes
5、在master上配置ntp服务
[hadoop@venn05 ~]$ vim /etc/ntp.conf
[hadoop@venn05 ~]$ more /etc/ntp.conf
# For more information about this file, see the man pages
# ntp.conf(), ntp_acc(), ntp_auth(), ntp_clock(), ntp_misc(), ntp_mon(). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1 # ntp服务器指向自己
restrict ::
restrict 192.168.0.0 mask 255.255.0.0 # 接受 192.168 段客户端
6、master上重启ntp服务
systemctl restart ntpd
7、在其他节点同步master的时间
[root@venn08 hadoop]# ntpdate venn05
25 Apr 23:23:48 ntpdate[1430]: step time server 192.168.1.5 offset -1.082561 sec
8、在其他节点启动ntp服务
systemctl start ntpd
systemctl enable ntpd
9、同步所以节点时间
timedatectl set-ntp yes
搞定
-------------更新----
如果ntp已经存在,但是发现服务器时间不同步,可能是同步的是本机,执行“ ntpdate venn05 ”出现如下报错:
ntpdate[]: the NTP socket is in use, exiting
解决:停止ntp,同步master,启动ntp
timedatectl set-ntp no ntpdate venn timedatectl set-ntp yes
上篇:
Hadoop3集群搭建之——配置ntp服务的更多相关文章
- Hadoop3集群搭建之——安装hadoop,配置环境
接上篇:Hadoop3集群搭建之——虚拟机安装 下篇:Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoop3集群搭建之——hbase安装及简单操作 上篇已 ...
- Hadoop3集群搭建之——hbase安装及简单操作
折腾了这么久,hbase终于装好了 ------------------------- 上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hado ...
- Hadoop3集群搭建之——hive添加自定义函数UDTF (一行输入,多行输出)
上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...
- Hadoop3集群搭建之——hive添加自定义函数UDTF
上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...
- Hadoop3集群搭建之——hive添加自定义函数UDF
上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...
- Hadoop3集群搭建之——hive安装
Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hbase安装及简单操作 现在到 ...
- Hadoop3集群搭建之——虚拟机安装
现在做的项目是个大数据报表系统,刚开始的时候,负责做Java方面的接口(项目前端为独立的Java web 系统,后端也是Java web的系统,前后端系统通过接口传输数据),后来领导觉得大家需要多元化 ...
- Kafka 0.9+Zookeeper3.4.6集群搭建、配置,新Client API的使用要点,高可用性测试,以及各种坑 (转载)
Kafka 0.9版本对java client的api做出了较大调整,本文主要总结了Kafka 0.9在集群搭建.高可用性.新API方面的相关过程和细节,以及本人在安装调试过程中踩出的各种坑. 关于K ...
- 大数据中HBase集群搭建与配置
hbase是分布式列式存储数据库,前提条件是需要搭建hadoop集群,需要Zookeeper集群提供znode锁机制,hadoop集群已经搭建,参考 Hadoop集群搭建 ,该文主要介绍Zookeep ...
随机推荐
- df.dropna()函数和df.ix(),df.at(),df.loc()
- 生成二维码的JAVA
不多说,上代码 package tcc; import java.awt.Color;import java.awt.Graphics2D;import java.awt.image.Buffered ...
- 通达OA 自定义菜单
1.首先在系统管理----菜单设置中添加菜单主分类,菜单的图片默认是在D:\MYOA\webroot\images中.2.然后再编辑该菜单的下一级,增加子菜单项,子菜单的路径就是您要设置的网址.3.最 ...
- 微信小程序——过滤器的模拟
>> 编写wxs文件——filter.wxs //1. 价格格式化 function getPriceFormat(value) { return parseFloat(isNaN(val ...
- 项目总结06:Java Excel文件导入功能HSSFWorkbook(xls)和 XSSFWorkbook (xlsx)
项目中碰到Excel文件打入数据功能Mark一下 package com.blue.pem.client.util; import java.io.File; import java.io.FileI ...
- win7安装sqlserver2008
双击启动程序,点击安装
- swift - 全屏imageView的适配 - UIViewContentMode选择
1. /// 设置当前图片view大小 func setFrame(){ if #available(iOS 11.0, *) { if let y = JY_WINDOW?.safeAreaInse ...
- day 27 Python中进程的操作
进程的创建和结束: multiprocess模块: multiprocess不是一个模块而是python中一个操作.管理进程的包 分为四个部分:创建进程部分,进程同步部分,进程池部分,进程之间数据共享 ...
- fastjson的常用方法
/** * 解析对象形式的json字符串 */ public static void test1() { String jsonStr = "{\"JACKIE_ZHANG\&qu ...
- C# Request.RawUrl与Request.Url的区别
RawUrl——不包含域名及端口的地址 Url——包含域名,最全