1.确认是否安装ntp服务:rpm -q ntp
2.确认ntp服务器可用性: ntpdate ntp.neu.edu.cn
3.安装ntp服务:yum -y ntp
4.配置ntp配置文件:
# vim /etc/ntp.conf
// 注释配置文件中原有的NTP服务器,并在其中添加自己所需的NTP服务器地址
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# server 0.centos.pool.ntp.org iburst
# server 1.centos.pool.ntp.org iburst
# server 2.centos.pool.ntp.org iburst
# server 3.centos.pool.ntp.org iburst
server ntp.neu.edu.cn iburst
5.启动ntp服务:ntp start enable
6.设置ntp服务器自启动: systemctl enable ntpd
7.查看ntp客户端运行状态:ntpstat