centos 更新系统时间以及定时同步网络时间

安装ntpdate

yum -y install ntpdate

查看当前时间

date

同步当前时间

NTP服务器参见(http://www.ntp.org.cn/)服务器

ntpdate cn.ntp.org.cn

加入定时任务

执行: crontab -ecode

打开定时任务编辑界面,输入 * */1 * * * ntpdate cn.ntp.org.cncrontab

每一小时执行一次时间同步get

相关文章
相关标签/搜索