1)在其中一个服务器上下载安装NTP软件
yum install ntp
2)验证是否安装成功
[root@NewBieMaster ~]# service ntpd status
Redirecting to /bin/systemctl status ntpd.service
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[root@NewBieMaster ~]# service ntpd start
Redirecting to /bin/systemctl start ntpd.service
[root@NewBieMaster ~]# service ntpd status
Redirecting to /bin/systemctl status ntpd.service
● ntpd.service - Network Time Service
Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
Active: active (running) since Sat 2021-06-26 16:56:07 +08; 6 days ago
Process: 19883 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 19884 (ntpd)
CGroup: /system.slice/ntpd.service
└─19884 /usr/sbin/ntpd -u ntp:ntp -g
Jun 26 16:56:07