cetnos 7 ntp服务的安装与配置

首先需要搭建yum本地仓库

http://www.cnblogs.com/jw35/p/5967677.html   #搭建yum仓库方法

yum install ntp -y        #安装ntp服务

修改ntp配置文件

vi /etc/ntp.conf    #编辑配置文件

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服务端地址    iburst

:wq    #保存退出

完成

原文地址:https://www.cnblogs.com/jw15327/p/5974705.html