1.修改服务器时区 确认系统时区 timedatectl status|grep 'Time zone' 如图如果已经是上海时区则无需调整 修改时区 #设置硬件时钟调整为与本地时钟一致 timedatectl set-local-rtc 1 #设置时区为上海 timedatectl set-timezone Asia/Shanghai 使用ntpdate同步时间 #安装ntpdate yum -y install ntpdate #同步时间 ntpdate -u pool.ntp.org #同步完成后,date命令查看时间是否正确 date 同步到系统 hwclock --systohc