同步时间
ntpdate us.pool.ntp.org
如果 ntpdate 命令没有安装
yum install -y ntpdate
设置时区为上海时区,也就是东八区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
最好还是使用软链接,例如设置时区为美国西部标准时间,即太平洋时间
ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime
同步时间
ntpdate us.pool.ntp.org
如果 ntpdate 命令没有安装
yum install -y ntpdate
设置时区为上海时区,也就是东八区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
最好还是使用软链接,例如设置时区为美国西部标准时间,即太平洋时间
ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime