及时修改日期
# date -s 12/24/2012
及时修改时间
# date -s 13:12:00
设定时间同步任务
#yum install ntpdate -y
#crontab -e
0 23 * * * /usr/sbin/ntpdate pool.ntp.org >> /var/log/ntpdate.log
# service crond restart
#每天23点整更新时间
# 如需手动执行更新时间,需要把ntpd服务关上,例如:service ntpd stop,同时如果ntpd服务设置成了自启动,也要在chkconfig中把ntpd设置为off
本文介绍了如何在Linux系统中进行时间同步配置,包括手动修改日期和时间的方法,通过安装ntpdate工具实现时间同步,并通过crontab定时任务确保系统时间每天自动更新。

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



