在centos 7中大家可能会使用ntp做时间同步,但是在centos8中,大家推荐另外一种工具-chrony
方法一:具体操作请查看下文:
**
yum install -y chrony
systemctl start chronyd
(注册成开机启动)systemctl enable chronyd
(查看)
timedatectl
rm /etc/localtime
从/usr/share/zoneinfo/中创建软连接以替换当前的时区信息
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
(再次查看)
timedatectl
**
方法二:ntpdate
如果还是希望使用 ntpdate,请参考这篇文章安装:
https://blog.whsir.com/post-4...
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。