3.# 修改配置文件[root@localhost ~]# mv /etc/ntp.conf{,.bak} # 操作之前先备份[root@localhost ~]# vim /etc/ntp.conf
server 0.asia.pool.ntp.org
server 1.asia.pool.ntp.org
server 2.asia.pool.ntp.org
server 3.asia.pool.ntp.org
server 127.127.1.0 iburst local clock # 当外部时间不可用时,使用本地时间
restrict 192.168.57.2 mask 255.255.255.0 nomodify # 允许更新的ip地址段