提要:自己安装的虚拟机或手动安装的linux系统,在安装完成后要确定虚拟机或服务器上的时间和网络时间是否同步。

    1. 使用date命令查看虚拟机上或服务器上的时间是否正确
    2. 将上海的时间作为参考:
      cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
    3. 同步网络时间,这时需要用到ntpdate工具
      (1) 安装
      yum install -y ntpdate
      (2) 同步
      ntpdate time.nist.gov
    4. 执行date命令确认同步成功
    5. 把系统时间同步到硬件,防止系统重启后时间恢复
      hwclock -w
    6. 重启虚拟机执行date命令

相关文章:

  • 2021-08-17
  • 2021-09-22
  • 2021-12-21
  • 2022-12-23
  • 2021-07-18
  • 2021-06-01
  • 2021-05-12
  • 2021-05-27
猜你喜欢
  • 2021-06-12
  • 2021-10-05
  • 2021-04-09
  • 2022-12-23
  • 2022-02-23
  • 2021-12-01
  • 2022-12-23
相关资源
相似解决方案