Linux VPS系统设置时区和同步时间的简单方法

rm -rf /etc/localtime #先删除默认的时区设置
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #替换上海/北京作为默认
ntpdate us.pool.ntp.org#同步时间
我们用date测试下当前时间

评论已关闭