疯狂の猿猴

CentOS8服务器,修改时区同步时间

linux修改时区为东八时区,北京时间,上海时间

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo "Asia/Shanghai" > /etc/timezone

CentOS

sudo yum install -y ntp
sudo systemctl enable ntpd
sudo ntpdate -q 0.rhel.pool.ntp.org
sudo systemctl restart ntpd

Debian/Ubuntu

sudo apt-get install -y ntp
sudo service ntp restart

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »