服务器时间校正相关命令

一、查看时间
# date -R

二、时区设置为UTC+8
首先执行 rm /etc/localtime
然后执行 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


三、同步时间服务器,校正时间
安装
debian: apt-get install ntpdate 
centos: yum install ntpdate


校正
ntpdate [ntp时间服务器地址]
以下,选一个即可
ntpdate time.nuri.net

ntpdate 0.asia.pool.ntp.org
ntpdate 1.asia.pool.ntp.org
ntpdate 2.asia.pool.ntp.org
ntpdate 3.asia.pool.ntp.org
ntpdate time.nist.gov

评论

此博客中的热门博文

AMAZONLightsail 平臺V2Ray三件套一鍵脚本完整安裝指南2019.11.02步驟及指令小結

CentOS7+v2ray官方一键脚本安装用到的相关命令及软件