zoukankan      html  css  js  c++  java
  • 虚拟机时间同步

    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

    查看时间是否已经同步。

  • 相关阅读:
    和为S的连续正数序列
    数组中只出现一次的数字
    平衡二叉树
    二叉树的深度
    水仙花数
    数列求和
    数值统计
    奇数乘积
    求绝对值
    求两点的距离
  • 原文地址:https://www.cnblogs.com/lvlin241/p/11967572.html
Copyright © 2011-2022 走看看