更新Linux服务器时间

1、修改系统时区(不修改的话,你同步时间会发现总是不对)

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime –这里我修改为了上海
2、安装ntpdate

yum -y install ntpdate
3、更新时间

ntpdate ntp1.aliyun.com –这里使用的阿里服务器,其余的可以百度ntp服务器就有了
4、将时间同步到BIOS里面,这样下次启动时,就会自动更新了

clock -w

发表评论

邮箱地址不会被公开。 必填项已用*标注

click to changeSecurity Code