-
1.安装ntp:
yum install -y ntp
2.修改ntp的配置文件(ntp服务端配置)
vi /etc/ntp.conf
```
# 配置日志
logfile /var/log/ntpd.log
#restrict 192.168.1.0 mask 255.255.255.0 nomodify nostrap
# 在3个网段下的所有机器都可以连接我的ntp服务器
restrict 192.168.3.0 mask 255.255.255.0 nomodify nostrap
# 注释默认的ntp服务器
# server 0.centos.pool.ntp.org iburst
service ntp1.aliyun.com
service ntp2.aliyun.com
service ntp3.aliyun.com
# 当服务器不可用,本机作为ntp服务器
server 127.0.0.1
fudge 127.0.0.1 stratum 10
```
3. 手动同步ntp服务器时间
ntpdate -u ntp1.aliyun.com
失败原因:防火墙 网络
4.启动
systemctl start ntpd
systemctl status ntpd
# 开机自启
systemctl enable ntpd
PS:同步需要5-10分钟
ntpstat
5.ntp客户端配置
vi /etc/ntp.conf
```
# 注释默认的时间服务器
# 同步master的时间(master的ip或主机名)
server 192.168.3.100
```
6.测试
修改时间
date -s "2019-05-01 19:10:30"
clock -w
date
# 查看同步状态
ntpstat
查看全部 -
HBase权限控制
查看全部 -
HBase权限范围2
查看全部 -
HBase权限范围1
查看全部 -
HBase权限管理
读
写
执行
创建
管理
查看全部 -
Ntp简介
查看全部 -
课程案列-主机规划
查看全部 -
HBase和传统数据库对比
查看全部 -
HBase特点
查看全部 -
HBase企业应用场景
查看全部 -
ntp实现同步 ha搭建在zookpeer下
查看全部 -
1111111
查看全部 -
111111
查看全部 -
HBase权限管理
查看全部 -
HBase的特点
查看全部
举报