linux centos 网络 时间 日期 同步

以你之姓@ 2021-08-19 22:51 481阅读 0赞

1、安装ntp和ntpdate工具

  1. yum -y install ntp ntpdate

2、设置系统时间与网络时间同步

  1. ntpdate ntp1.aliyun.com

这里主要就是通过时间服务器对系统时间进行同步,所以ntp.ntsc.ac.cn并不是固定的,可使用的公共ntp服务器很多,可根据所在区域选择合适自己的ntp服务器,具体查看 《linux 国内 NTP时间服务器地址》 https://blog.csdn.net/whatday/article/details/100765649

3、为了防止系统重启后时间被还原,需要将系统时间写入硬件时间

  1. [root@localhost ~]# hwclock --systohc

其他参考:

NTP时间服务器简介 https://blog.csdn.net/whatday/article/details/100766041

linux 查看修改 系统 时区时间 https://blog.csdn.net/whatday/article/details/100765230

发表评论

表情:
评论列表 (有 0 条评论,481人围观)

还没有评论,来说两句吧...

相关阅读