1.配置ntp server
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap
server clock.redhat.com
server clock2.redhat.com
restrict clock.redhat.com mask 255.255.255.255 nomodify notrap noquery
restrict clock2.redhat.com mask 255.255.255.255 nomodify notrap noquery
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
driftfile /var/lib/ntp/drift
broadcastdelay 0.008
authenticate yes
keys /etc/ntp/keys
2.client
#crontab -e
50 23 * * * /usr/sbin/ntpdate 192.168.1.1;/sbin/hwclock --systohc >> /dev/null 2>&1
阅读(793) | 评论(1) | 转发(0) |