望穿秋水
管理&技术&业务 项目管理方面:加强通过工具辅助管理,构建Web项目管理系统来协助项目管理。技术开发方面:加强系统分析能力、架构设计能力,时刻把握新技术动态。业务方面:加强需求分析能力,使最终需求来源于客户又高于客户。

配置NTP服务。标准的做法是配置NTP服务器,但是这里为了方便就用简化的方式配置了。

这个在安装初期,不是必须的,只要保证各机器的时间同步就行,使用如下命令可以查看时间是否同步:

[root@cdh1 ~]# date;ssh cdh2 date;
2019年 04月 12日 星期五 16:19:58 CST
2019年 04月 12日 星期五 16:19:59 CST

时间差1-2秒钟就没事。

 确保每台机器的ntpd服务都是启动状态,否则后面CDH安装完成后,主机状态会是错误状态。

systemctl start ntpd.service

systemctl status ntpd.service

设置开机自动启动:

systemctl enable ntpd.service

 

 


1.执行命令,修改配置。

vim /etc/ntp.conf
            我修改的配置如下,注意第一行配置根据自己centos的网关来配置。

restrict 192.168.9.0 mask 255.255.255.0 nomodify notrap 

# Use public servers from the pool.ntp.org project.

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

#server 0.centos.pool.ntp.org iburst

#server 1.centos.pool.ntp.org iburst

#server 2.centos.pool.ntp.org iburst

#server 3.centos.pool.ntp.org iburst



server 127.127.1.0

fudge 127.127.1.0 stratum 10
            

2.执行命令

vim /etc/sysconfig/ntpd
            增加一行:

            SYNC_HWCLOCK=yes

 

 3.重启ntp服务

systemctl restart ntpd.service

systemctl status ntpd.service

posted on 2019-04-12 16:21  望穿秋水  阅读(434)  评论(0编辑  收藏  举报