时间服务器
NTP ------ 网络时间协议( Network Time Protocol ),通过 udp 123 端口进行网络时钟同步。
yum install -y chrony ------安装软件
客户端配置
vim /etc/chrony.conf ------导入时间库

systemctl restart chronyd ------重启
chronyc sources ------查看信号源

date ------查看时间

- * 表示chronyd当前同步到的源
- + 表示可接受的信号源,与选定的信号源组合在一起
- ? 指示已失去连接性或其数据包未通过所有测试的源。它也显示在启动时,直到从中至少收集了3
- 个样本为止
服务端配置
vim /etc/chrony.conf ------进入配置文件
允许客户端网段可以访问服务器

修改为客户端的IP地址

systemctl restart chronyd ------重启
chronyc sources ------查看信号源
测试:
date ------查看当前时间

date -s 8:30 ------修改时间

systemctl restart chronyd ------重启
chronyc sources ------ 查看信号源

