1.安装 chrony
yum install chrony -y
2.配置配置文件
vi /etc/chrony.conf
注释掉centos时间服务器,改用阿里云时间服务器
server ntp.cloud.aliyuncs.com minpoll 4 maxpoll 10 iburst
server ntp.aliyun.com minpoll 4 maxpoll 10 iburst
server ntp1.aliyun.com minpoll 4 maxpoll 1 iburst
server ntp1.cloud.aliyuncs.com minpoll 4 maxpoll 10 iburst
server ntp10.cloud.aliyuncs.com minpoll 4 maxpoll 10 iburst
3.启动时间同步服务
systemctl start chronyd.service
4.同步系统时间:
要手动同步系统时间,可以使用以下命令:
chronyc makestep
检查Chrony状态:
5.检查Chrony服务状态:
systemctl status chronyd
查看当前时间同步状态:
chronyc tracking
查看可用的时间源服务器:
chronyc sources
最后修改时间:2023-10-09 11:51:58
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。