1. 删除本地时间
rm -rf /etc/localtime
2. 设置时区为上海
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3. 同步时间
ntpdate stdtime.sinica.edu.tw
如果提示找不到命令的话那么就安装ntp
yum -y install ntpdate ntp
4. 设定硬件时间和软件时间的一致并校准
/sbin/hwclock --systohc
1. 删除本地时间
rm -rf /etc/localtime
2. 设置时区为上海
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3. 同步时间
ntpdate stdtime.sinica.edu.tw
如果提示找不到命令的话那么就安装ntp
yum -y install ntpdate ntp
4. 设定硬件时间和软件时间的一致并校准
/sbin/hwclock --systohc