centos 设置时区和更新系统时间


#设置时区为上海
timedatectl set-timezone Asia/Shanghai

#安装 ntpdate
yum -y install ntpdate

#更新服务器时间
ntpdate -u pool.ntp.org



Preview Image