VPS

centos 7 网络同步时间

929355193 · 5月30日 · 2020年


yum -y install ntp ntpdate
ntpdate ntp1.aliyun.com

//
开机启动
vim /etc/rc.d/rc.local
/usr/sbin/ntpdate ntp1.aliyun.com;/sbin/hwclock -w

定时任务
crontab -e
0 */1 * * * ntpdate ntp1.aliyun.com;/sbin/hwclock -w

提前which查看site