微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

【Hadoop集群】四、时间同步

一、安装ntpd

查看状态
sudo systemctl status ntpd 启动 sudo systemctl start ntpd 开机自启 sudo systemctl is-enabled ntpd

    sudo systemctl enable ntpd


 配置

     $ sudo vim /etc/ntp.conf

          第一处:修改成自己的网段

          #Hosts on local network are less restricted.

          restrict 192.168.74.0 mask 255.255.255.0 nomodify notrap

          第二处:由于是内网环境,就不需要这些服务配置,注释

          # Please consider joining the pool  (http://www.pool.ntp.org/join.html).

          # server 0.centos.pool.ntp.org

          # server 1.centos.pool.ntp.org

          # server 2.centos.pool.ntp.org

          第三处:ntp server提供的本地服务

          server 127.127.1.0                     #local clock

          fudge 127.127.1.0   stratum  10



从机同步时间
sudo ntpdate hadoop101

  

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐