首页 > 其他 > 详细

虚拟机时间同步

时间:2019-12-01 21:52:36      阅读:79      评论:0      收藏:0      [点我收藏+]

Linux 时间同步 

 

所有节点安装 NTP:
 yum install ntp
配置开机启动:
 chkconfig ntpd on
检查是否设置成功:
 chkconfig --list ntpd (2-5 为 on 状态则成功)
设置同步:
 ntpdate -u ntp.sjtu.edu.cn(时钟服务器根据实际环境设置、本文采用 210.72.145.44-国家授时中心服务器 IP 地址)

 

1. ntpdate -u ntp.sjtu.edu.cn

执行标志: 1 Dec 04:30:04 ntpdate[30679]: adjust time server 193.182.111.14 offset 0.287204 sec

2. cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

执行信息: cp: overwrite `/etc/localtime‘?   选择 y

3. ntpdate pool.ntp.org

执行标志: 1 Dec 20:33:42 ntpdate[30695]: adjust time server 193.182.111.14 offset 0.171588 sec

4.  date

查看时间是否已经同步。

虚拟机时间同步

原文:https://www.cnblogs.com/lvlin241/p/11967572.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!