博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux 服务器同步北京时间以及开机自动同步时间
阅读量:2048 次
发布时间:2019-04-28

本文共 192 字,大约阅读时间需要 1 分钟。

安装ntpdate   

 yum install ntpdate

删除自带的时间文件

rm -rf /etc/localtime

ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

修改定时任务

crontab -e

每天5点同步一次时间

0 5 * * *  /usr/sbin/ntpdate  -u ntp1.aliyun.com

转载地址:http://iihof.baihongyu.com/

你可能感兴趣的文章
合并压缩css和Js的方式( 转载)
查看>>
压缩html,可以在输出之前使用(转载)
查看>>
用户中心和discuz的ucenter共通
查看>>
使用opcache为你的网站加速(转载)
查看>>
git push命令每次都要输入用户名和密码的问题处理
查看>>
在网站添加qq客服功能
查看>>
英文技术文档阅读练习——php的早期版本
查看>>
"Notice: unserialize(): Error at offset xx of xxx bytes"错误的处理(转载)
查看>>
windows下c/c++环境开发搭建
查看>>
php中的declare是干什么的——转载
查看>>
三种常见的排序算法
查看>>
ueditor自定义菜单(转载)
查看>>
php页面meta头设置
查看>>
指针函数和函数指针的区别
查看>>
empty方法
查看>>
What does ‘composer dump-autoload’ do in Laravel?
查看>>
在win7系统中使用nodejs在WebStrom下配置socket.io
查看>>
caffe:用自己的图像数据训练模型
查看>>
ubuntu下clion中配置opencv的CMakeLists.txt
查看>>
什么是卷积 卷积有什么用
查看>>