上篇:

Hadoop3集群搭建之——虚拟机安装

Hadoop3集群搭建之——安装hadoop,配置环境

下篇:

Hadoop3集群搭建之——hive安装

Hadoop3集群搭建之——hbase安装及简单操作

  安装好的的虚拟机,发现时间不一致,相差还比较大,对于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集群搭建之——虚拟机安装

Hadoop3集群搭建之——安装hadoop,配置环境

Hadoop3集群搭建之——hbase安装及简单操作

Hadoop3集群搭建之——配置ntp服务的更多相关文章

  1. Hadoop3集群搭建之——安装hadoop,配置环境

    接上篇:Hadoop3集群搭建之——虚拟机安装 下篇:Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoop3集群搭建之——hbase安装及简单操作 上篇已 ...

  2. Hadoop3集群搭建之——hbase安装及简单操作

    折腾了这么久,hbase终于装好了 ------------------------- 上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hado ...

  3. Hadoop3集群搭建之——hive添加自定义函数UDTF (一行输入,多行输出)

    上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...

  4. Hadoop3集群搭建之——hive添加自定义函数UDTF

    上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...

  5. Hadoop3集群搭建之——hive添加自定义函数UDF

    上篇: Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hive安装 Hadoo ...

  6. Hadoop3集群搭建之——hive安装

    Hadoop3集群搭建之——虚拟机安装 Hadoop3集群搭建之——安装hadoop,配置环境 Hadoop3集群搭建之——配置ntp服务 Hadoop3集群搭建之——hbase安装及简单操作 现在到 ...

  7. Hadoop3集群搭建之——虚拟机安装

    现在做的项目是个大数据报表系统,刚开始的时候,负责做Java方面的接口(项目前端为独立的Java web 系统,后端也是Java web的系统,前后端系统通过接口传输数据),后来领导觉得大家需要多元化 ...

  8. Kafka 0.9+Zookeeper3.4.6集群搭建、配置,新Client API的使用要点,高可用性测试,以及各种坑 (转载)

    Kafka 0.9版本对java client的api做出了较大调整,本文主要总结了Kafka 0.9在集群搭建.高可用性.新API方面的相关过程和细节,以及本人在安装调试过程中踩出的各种坑. 关于K ...

  9. 大数据中HBase集群搭建与配置

    hbase是分布式列式存储数据库,前提条件是需要搭建hadoop集群,需要Zookeeper集群提供znode锁机制,hadoop集群已经搭建,参考 Hadoop集群搭建 ,该文主要介绍Zookeep ...

随机推荐

  1. 206. Reverse Linked List (List)

    Reverse a singly linked list. /** * Definition for singly-linked list. * struct ListNode { * int val ...

  2. 装了appserv之后,浏览器中访问localhost加载不了

    AppServe下载地址:https://AppServnetwork.com/ 如果只下载Apache,推荐大神博客http://www.cnblogs.com/zhaoqingqing/p/496 ...

  3. 快速了解和使用Photon Server

    https://blog.csdn.net/qq_36565626/article/details/78710787

  4. POJ 1177 Picture(线段树周长并)

      描述 A number of rectangular posters, photographs and other pictures of the same shape are pasted on ...

  5. cloud配置中心遇到的坑

    https://blog.csdn.net/z960339491/article/details/80593982分布式配置中心为什么要有用分布式配置中心这玩意儿?现在这微服务大军已经覆盖了各种大小型 ...

  6. java_2变量和运算符

    1.变量 存储数据的容器. 2.变量创建的3要素 数据类型 变量名 = 变量值: 如int  a = 10; 3.数据类型的自动转化 当小范围变量向大范围变量转化的时候,会发生这种情况.如int类型变 ...

  7. AngularJS——第7章 依赖注入

    第7章 依赖注入 AngularJS采用模块化的方式组织代码,将一些通用逻辑封装成一个对象或函数,实现最大程度的复用,这导致了使用者和被使用者之间存在依赖关系. 所谓依赖注入是指在运行时自动查找依赖关 ...

  8. linux查看目录下所有文件内容中是否包含某个字符串

    转发自:http://blog.csdn.net/yimingsilence/article/details/76071949 查找目录下的所有文件中是否含有某个字符串 find .|xargs gr ...

  9. Linux驱动之内核加载模块过程分析

    Linux内核支持动态的加载模块运行:比如insmod first_drv.ko,这样就可以将模块加载到内核所在空间供应用程序调用.现在简单描述下insmod first_drv.ko的过程 1.in ...

  10. 27.MySQL备份与恢复

    27.备份与恢复27.1 备份/恢复策略考虑因素:备份表的存储引擎(事务性or非事务性):全备份or增量备份用复制做异地备份定期备份,考虑恢复时间确保mysql打开log-bin,有了BINLOG,M ...