centos7 自动同步时间
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
vim /etc/sysconfig/clock
ZONE="Asia/Shanghai"UTC=falseARC=falseyum install -y ntpsystemctl start ntpdsystemctl enable ntpdvim /etc/rc.d/rc.local/usr/sbin/ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -wcrontab -e0 */1 * * * ntpdate ntp1.aliyun.com > /dev/null 2>&1; /sbin/hwclock -w

浙公网安备 33010602011771号