cp -rf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime;yum install -y ntp ;yum install -y ntpdate;whereis crontab;yum install -y crontabs
crontab -e
00 04 * * * /usr/sbin/ntpdate us.pool.ntp.org;/sbin/hwclock -w;
service crond restart;
crontab -e
00 04 * * * /usr/sbin/ntpdate us.pool.ntp.org;/sbin/hwclock -w;
service crond restart;

本文介绍如何在Linux系统中通过一系列命令配置定时任务以实现与NTP服务器的时间同步。包括设置本地时间、安装NTP相关软件包、编辑定时任务文件等步骤。
5455

被折叠的 条评论
为什么被折叠?



