rpm -qa | grep ntp-*Ubuntu:dpkg -l | grep ntp-*
sudo yum install -y ntpsudo apt-get install -y ntpsudo vim /etc/ntp.confserver 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
ntp1.aliyun.com
ntp2.aliyun.com
ntp3.aliyun.com
ntp4.aliyun.com
ntp5.aliyun.com
ntp6.aliyun.com
ntp7.aliyun.com
sudo service ntpd startsudo chkconfig ntpd onsudo systemctl start ntpd.servicesudo systemctl enable ntpd.servicesudo vim /etc/ntp.conf
server 0.cn.pool.ntp.org
server 1.cn.pool.ntp.org
server 2.cn.pool.ntp.org
server 3.cn.pool.ntp.org
restrict default kod nomodify notrap nopeer noquery restrict -6 default kod nomodify notrap nopeer noquery restrict 127.0.0.1 restrict 192.168.0.0 mask 255.255.0.0 nomodify notrap nopeer noquery restrict 172.16.0.0 mask 255.240.0.0 nomodify notrap nopeer noquery restrict 100.64.0.0 mask 255.192.0.0 nomodify notrap nopeer noquery restrict 10.0.0.0 mask 255.0.0.0 nomodify notrap nopeer noquery
server 127.127.1.0 fudge 127.127.1.0 stratum 10
restrict ntp1.aliyun.com nomodify notrap nopeer noquery restrict ntp1.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp10.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp11.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp12.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp2.aliyun.com nomodify notrap nopeer noquery restrict ntp2.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp3.aliyun.com nomodify notrap nopeer noquery restrict ntp3.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp4.aliyun.com nomodify notrap nopeer noquery restrict ntp4.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp5.aliyun.com nomodify notrap nopeer noquery restrict ntp5.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp6.aliyun.com nomodify notrap nopeer noquery restrict ntp6.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp7.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp8.cloud.aliyuncs.com nomodify notrap nopeer noquery restrict ntp9.cloud.aliyuncs.com nomodify notrap nopeer noquery
server ntp1.aliyun.com iburst minpoll 4 maxpoll 10 server ntp1.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp10.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp11.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp12.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp2.aliyun.com iburst minpoll 4 maxpoll 10 server ntp2.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp3.aliyun.com iburst minpoll 4 maxpoll 10 server ntp3.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp4.aliyun.com iburst minpoll 4 maxpoll 10 server ntp4.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp5.aliyun.com iburst minpoll 4 maxpoll 10 server ntp5.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp6.aliyun.com iburst minpoll 4 maxpoll 10 server ntp6.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp7.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp8.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 server ntp9.cloud.aliyuncs.com iburst minpoll 4 maxpoll 10 ```
sudo service ntpd stop(改配置后,先停再启动)sudo service ntpd startsudo ntpdate ntp1.aliyun.com
sudo chkconfig ntpd onsudo apt-get install -y sysv-rc-conf sudo sysv-rc-conf ntpd on