centos设置时间同步

yum -y install ntp
ntpdate 0.centos.pool.ntp.org
hwclock -w
systemctl start ntpd.service
hwclock -r && date