前言

以往安装服务器时间都是正常,但是最近服务器的时间经常出现问题,所以在安装配置完成服务器之后需要对服务器的时间进行测试,如果服务器时间异常,那么当程序去取系统时间的时候就会出现问题。

时间相关命令记录

查看时间:date

 

同步时间:

安装ntpdate工具

yum -y install ntp ntpdate

设置系统时间与网络时间同步

ntpdate cn.pool.ntp.org

将系统时间写入硬件时间

hwclock --systohc

 

调整时区:

timedatectl set-timezone Asia/Shanghai

 

相关文章:

  • 2022-01-04
  • 2021-11-24
  • 2021-11-04
  • 2022-01-15
  • 2022-01-07
  • 2022-12-23
  • 2021-09-03
  • 2022-01-26
猜你喜欢
  • 2021-11-08
  • 2021-11-04
  • 2022-12-23
  • 2021-12-24
  • 2021-12-14
  • 2021-11-24
  • 2021-11-23
相关资源
相似解决方案