X ntp客户端同步服务器的方法

x修改对象(如下为客户端):
10.12x.25.161
10.12x.25.171

目前ntpd是禁用的

开启ntpd服务:
systemctl start ntpd.service
systemctl enable ntpd.service

修改ntpd内容如下:
vi /etc/sysconfig/ntpd
# Command line options for ntpd
OPTIONS="-g -x -p /var/run/ntpd.pid"

定义时钟同步对象
vi /etc/ntp.conf
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 10x.12x.13x.1 perfer
server 10x.12x.13x.2 iburst

server 0.rhel.pool.ntp.org iburst
server 1.rhel.pool.ntp.org iburst
server 2.rhel.pool.ntp.org iburst
server 3.rhel.pool.ntp.org iburst

禁用原来的时钟同步作业:
crontab -e

#*/10 * * * * /usr/sbin/ntpdate -u 10.120.137.11 >/root/ntpdate_11.txt &
#*/10 * * * * /usr/sbin/ntpdate -u 10.120.137.12 >/root/ntpdate_12.txt &

原文地址:https://www.cnblogs.com/chendian0/p/13949374.html