执行命令更改为中国上海时区:

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

 提示:cp: overwrite ‘/etc/localtime’?,输入y

[root@localhost log]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
cp: overwrite ‘/etc/localtime’? y

 设置时间自动同步:

yum install -y ntp
ntpdate us.pool.ntp.org

检查

date

  Centos7 修改时间为中国时区

 

相关文章:

  • 2022-01-29
  • 2022-12-23
  • 2021-07-13
  • 2022-03-04
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-02-02
  • 2021-08-22
相关资源
相似解决方案