linux centos 网络 时间 日期 同步
1、安装ntp和ntpdate工具
yum -y install ntp ntpdate
2、设置系统时间与网络时间同步
ntpdate ntp1.aliyun.com
这里主要就是通过时间服务器对系统时间进行同步,所以ntp.ntsc.ac.cn并不是固定的,可使用的公共ntp服务器很多,可根据所在区域选择合适自己的ntp服务器,具体查看 《linux 国内 NTP时间服务器地址》 https://blog.csdn.net/whatday/article/details/100765649
3、为了防止系统重启后时间被还原,需要将系统时间写入硬件时间
[root@localhost ~]# hwclock --systohc
其他参考:
NTP时间服务器简介 https://blog.csdn.net/whatday/article/details/100766041
linux 查看修改 系统 时区时间 https://blog.csdn.net/whatday/article/details/100765230
还没有评论,来说两句吧...