1、服務(wù)器端安裝
1.1、安裝chrony時間同步服務(wù)器
wget http://www.rpmfind.net/linux/centos/7.8.2003/os/x86_64/Packages/chrony-3.4-1.el7.x86_64.rpm
rpm -ivh chrony-3.4-1.el7.x86_64.rpm
或 yum install -y chrony
systemctl start chronyd
systemctl status chronyd
1.2、修改配置文件
vi /etc/chrony.conf
server news.neu.edu.cn iburst
server ntp.sjtu.edu.cn iburst
allow 192.168.100.0/24
1.3、重啟服務(wù)
systemctl restart chronyd
systemctl enable chronyd
2、客戶端安裝
2.1、安裝chrony時間同步服務(wù)器
wget http://www.rpmfind.net/linux/centos/7.8.2003/os/x86_64/Packages/chrony-3.4-1.el7.x86_64.rpm wget http://rpmfind.net/linux/centos/7.8.2003/os/x86_64/Packages/libseccomp-2.3.1-4.el7.x86_64.rpm
wget http://www.rpmfind.net/linux/centos/7.8.2003/os/x86_64/Packages/ntpdate-4.2.6p5-29.el7.centos.x86_64.rpm
rpm -ivh libseccomp-2.3.1-4.el7.x86_64.rpm
rpm -ivh chrony-3.4-1.el7.x86_64.rpm
rpm -ivh ntpdate-4.2.6p5-29.el7.centos.x86_64.rpm
或 yum install -y chrony ntpdate
2.2、修改配置文件
vi /etc/chrony.conf
server 192.168.200.18 iburst #chrony服務(wù)器ip地址
2.3、重啟服務(wù)
systemctl restart chronyd
systemctl enable chronyd
chronyc sources
clock -w
2.4、同步服務(wù)器時間
ntpdate 192.168.200.18