在CentOS Linux中终端命令中执行以下命令:

1).vi /etc/sysconfig/clock   #编辑时间配置文件

    ZONE="Asia/Shanghai"

    UTC=false                   #设置为false,硬件时钟不于utc时间一致

    ARC=false

2).ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime    #linux的时区设置为上海时区

3).ntpdate cn.pool.ntp.org    #对准时间

4)./sbin/hwclock --systohc   #设置硬件时间和系统时间一致并校准

相关文章:

  • 2021-09-11
  • 2021-12-23
  • 2021-05-27
  • 2021-11-05
  • 2021-05-28
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-02-21
相关资源
相似解决方案