执行命令更改为中国上海时区:
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