1./etc/ntp
[root@gdgz-htjf-kvc01-1 ntp]# cat /etc/ntp.conf|grep ^# -v
restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
restrict 0.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
Restrict ---------指定可以进行NTP通信的IP地址或网段
Server -----------指定时间校对的NTP服务器,优先级从上到下。
fudge --------
driftfile ---------和上层NTP服务器的频率误差记录在此文件
logfile -----------指定NTP服务日志文件
broadcast ---------指定NTP服务的网段
2./etc/ntp/step-tickers
[root@gdgz-htjf-kvc01-1 ntp]# cat /etc/ntp/step-tickers
0.centos.pool.ntp.org
1.centos.pool.ntp.org
2.centos.pool.ntp.org
当NTP服务启动会自动和此文件记录的NTP服务器进行时间校对
3./etc/sysconfig/ntpd
[root@gdgz-htjf-kvc01-1 ntp]# cat /etc/sysconfig/ntpd
# Drop root to id 'ntp:ntp' by default.
OPTIONS="-u ntp:ntp -p /var/run/ntpd.pid"
# Set to 'yes' to sync hw clock after successful ntpdate
SYNC_HWCLOCK=no
# Additional options for ntpdate
NTPDATE_OPTIONS=""
4.其他命令
ntpstat 显示NTP服务器的相关状态
ntpq -------启动标准的NTP查询
ntpdate ---------指定立即进行校对的时间服务器
NTP 服务时间
133.100.11.8 prefer
210.72.145.44
203.117.180.36
131.107.1.10
time.asia.apple.com