Linux 7 下NTP 时间服务器

#  yum install -y ntp ntpdate

# rpm -qa ntp

# cp /etc/ntp.conf.bak

# egrep -v "^$|#" /etc/ntp.conf.bak  >/etc/ntp.conf

# vi /etc/ntp.conf

driftfile /var/lib/ntp/drift
restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
restrict ::1
server ntp1.aliyun.com iburst
#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
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
disable monitor

# systemctl start ntpd

# ntpq -p

 

posted @ 2023-06-13 10:58  雨夜清风  Views(24)  Comments(0Edit  收藏  举报