0%

vps时间设置

设置时区为北京时间

1
2
rm -rf /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

设置ntp同步时间
debian

1
2
apt-get update
apt-get install ntp ntpdate -y

centos

1
yum install ntp ntpdate -y
1
2
3
service ntpd stop                 #停止ntp服务
ntpdate us.pool.ntp.org #同步ntp时间
service ntpd start #启动ntp服务

完成