A-A+

centos7时间同步

2019年01月25日 CentOS7 暂无评论 阅读 272 次浏览 次
1.如果你的linux系统没有ntpdate这个命令,安装即可
 
yum install -y ntp
 
2.安装完了之后,你不要做什么配置,也不需要,直接测试一下
 
[root@git conf.d]# ntpdate asia.pool.ntp.org
 
21 Mar 10:52:01 ntpdate[9247]: step time server 209.58.185.100 offset 38761.507576 sec
 
3.如果出现上面的内容,说明同步成功了。然后在crontab里面添加任务计划,10分钟同步一次
 
*/10 * * * * ntpdate asia.pool.ntp.org
 
4.推荐几个时间服务器
 
time.nist.gov
time.nuri.net
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org
asia.pool.ntp.org

 

评论已关闭!

Copyright © 香港虚拟主机_美国虚拟主机_香港服务器_美国服务器租用托管 保留所有权利.   Theme  Ality 蜀ICP备14006632号-1

用户登录