linux 服务器时间同步

1、安装时间同步命令

yum -y install ntpdate

2、设置定时任务

crontab -e 

# 每隔一小时,执行一次同步

0 */1 * * *  ntpdate time1.aliyun.com

3、查看定时任务

crontab -l

  

posted @ 2022-12-05 16:48  西瓜君~  阅读(1141)  评论(0编辑  收藏  举报