Centos7 修改时间为中国时区

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

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

  

 

posted @ 2021-04-02 07:34  魏三斗  阅读(1023)  评论(0编辑  收藏  举报