CentOS8系统时间同步解决方法
2021/6/11 7:27:56
本文主要是介绍CentOS8系统时间同步解决方法,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
CentOS8系统时间同步解决方法
热度 2,618 度 Published 2020年8月29日 by kiccleaf装了新的CentOS8,才发现有很多原来使用的工具在新版本中已经被其他工具替代,今天把常规的系统时间同步问题解决一下,CentOS7及以下的都是采用NTP来解决,《linux中rc.local设置开机自启没有生效解决方案》。
找了一下方法,原来是使用了另一个工具替代了,记录一下先
[root@kiccleaf home]# yum install -y chrony Installed: chrony-3.5-1.el8.x86_64 timedatex-0.5-3.el8.x86_64 Complete! 安装好工具,先启动 [root@kiccleaf home]# systemctl start chronyd 设为系统自动启动 [root@kiccleaf home]# systemctl enable chronyd 编辑一下配置文件 [root@kiccleaf home]# vim /etc/chrony.conf
/etc/chrony.conf配置文件内容:
# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #pool 2.centos.pool.ntp.org iburst (这一行注释掉,增加以下两行) server ntp.aliyun.com iburst server cn.ntp.org.cn iburst
重新加载配置 [root@kiccleaf home]# systemctl restart chronyd.service [root@kiccleaf home]# chronyc sources -v 210 Number of sources = 2 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || Reachability register (octal) -. | xxxx = adjusted offset, || Log2(Polling interval) --. | | yyyy = measured offset, || \ | | zzzz = estimated error. || | | \ MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* 203.107.6.88 2 6 7 2 -188us[+6871us] +/- 24ms ^- 61.177.189.190 3 6 17 19 +663us[ +663us] +/- 97ms [root@kiccleaf home]# date Sat Aug 29 16:26:08 CST 2020
这篇关于CentOS8系统时间同步解决方法的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-06-19EntBot.ai: AI Website Chatbot for Product Guides and Development Doc
- 2024-06-17zero-shot-learning-definition-examples-comparison
- 2024-06-06Package Easy(基于 NSIS 的打包exe安装包工具)使用方法-icode9专业技术文章分享
- 2024-06-06基于 casdoor 的 ELK 开源登录认证解决方案: elk-auth-casdoor-icode9专业技术文章分享
- 2024-05-29Elasticsearch慢查询日志配置
- 2024-05-29揭秘华为如此多成功项目的产品关键——Charter模板
- 2024-05-29海外IDC业务拓展的7大挑战
- 2024-05-29InLine Chat功能优化对标Github Copilot,CodeGeeX带来更高效、更直观的编程体验!
- 2024-05-29CodeGeeX 智能编程助手 6 项功能升级,在Visual Studio插件市场霸榜2周!
- 2024-05-29AutoMQ 生态集成 Apache Doris