1、安装ntp包
yum -y install ntp
2、修改配置文件,使用本服务器的时间作为同步时间
vim /etc/ntp.conf
3、修改如下几步
4、启动ntp服务
systemctl start ntpd
5,查看是否同步
6、设置开机启动
systemctl enable ntpd
7,关闭防火墙和沙盒
systemctl stop firewalld
setenforce 0
8,客户端配置
安装ntp: yum -y install ntp
9、修改配置文件,将刚刚搭建好的NTP服务器作为客户