更新Linux服务器时间

  |   0 评论   |   0 浏览
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


标题:更新Linux服务器时间
作者:zytops
地址:https://www.zytops.com/articles/2024/02/28/1709085109225.html