1、安装NTP软件包

yum install ntp

2、在ntp.conf中配置Restrict values

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

3、只允许指定客户端

restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

4、添加本地时钟

server  127.127.1.0 # local clock
fudge   127.127.1.0 stratum 10

5、修改NTP日志参数

driftfile /var/lib/ntp/ntp.drift
logfile   /var/log/ntp.log

6、启动NTP服务(作为Server)

service ntpd start