NTP时间同步服务器

NTP协议概述

Network Time Protocol 时间网络协议

1.他用来同步网络中各个计算机的时间的协议
2.210.72.145.39(国家授时中心服务器IP地址)

Stratum(分层设计)

Stratum层的总数限制在15以内(包括15)

搭建NTP服务

默认Linux系统是安装的,如没有安装需要安装
[root@root-cloud ~]# rpm -q chrony ## 查询是否安装(已安装)
chrony-3.4-1.el7.x86_64
[root@root-cloud ~]# yum -y install chrony ## 没有安装即可
[root@root-cloud ~]# rpm -qc chrony ## 查看服务主配置文件位置
在这里插入图片描述

修改配置文件

主配置文件:/etc/chrony.conf
在这里插入图片描述

启动读服务,查看状态

[root@root-cloud ~]# systemctl restart chronyd
[root@root-cloud ~]# systemctl status chronyd
[root@localhost ~]# firewall-cmd --set-default-zone=trusted 修改为trusted模式
在这里插入图片描述

客户端修改配置文件指定时间同步服务器

[root@localhost ~]# vi /etc/chrony.conf
在这里插入图片描述

刷新配置重启客户端服务

[root@localhost ~]# systemctl restart chronyd
[root@localhost ~]# systemctl status chronyd
在这里插入图片描述

客户端测试

[root@localhost ~]# chronyc sources -v ## 查看同步命令
在这里插入图片描述

客户端验证

[root@localhost ~]# date -s “2018-1-1” ## 修改客户端时间日期
2018年 01月 01日 星期一 00:00:00 CST
[root@localhost ~]# date ## 查看客户端时间日期
2018年 01月 01日 星期一 00:00:05 CST
[root@localhost ~]# systemctl restart chronyd ## 重启服务来读取配置刷新时间
[root@localhost ~]# date ## 再次查看时间日期发现正常了
2022年 03月 30日 星期三 13:29:05 CST

附加(时间同步地址)

s1a.time.edu.cn 北京邮电大学 010
s1b.time.edu.cn 清华大学 010-62795818-6105
s1c.time.edu.cn 北京大学 010-62753007
s1d.time.edu.cn 东南大学 025-3794342-309
s1e.time.edu.cn 清华大学 010-62795818-6105
s2a.time.edu.cn 清华大学 010-62795818-6105
s2b.time.edu.cn 清华大学 010-62795818-6105
s2c.time.edu.cn 北京邮电大学 010-62283044-8003
s2d.time.edu.cn 西南地区网络中心
s2e.time.edu.cn 西北地区网络中心 029-2669037
s2f.time.edu.cn 东北地区网络中心 024-23966854
s2g.time.edu.cn 华东南地区网络中心 021-62932901-8101
s2h.time.edu.cn 四川大学网络管理中心 028-85414820
s2j.time.edu.cn 大连理工大学网络中心 0411-4708642
s2k.time.edu.cn CERNET桂林主节点 0773-5845246
s2m.time.edu.cn 北京大学
time.jmu.edu.cn

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

文龙的_VLOG.

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值