Centos 8 搭建时钟服务器

  • 安装chrony
  • 设置chrony随系统自动启动
  • 配置chrony.conf,允许客户端同步
  • 配置防火墙
  • 启动chrony服务

由于CentOS8.0中默认不再支持ntp软件包,时间同步将由chrony来实现。

安装chrony

yum install chrony -y

设置chrony随系统自动启动

systemctl enable chronyd

配置chrony.conf,允许客户端同步

vi /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   \\上游时钟服务器地址
# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift# Allow the system clock to be stepped in the first three updates
# if its offset is larger than 1 second.
makestep 1.0 3# Enable kernel synchronization of the real-time clock (RTC).
rtcsync# Enable hardware timestamping on all interfaces that support it.
#hwtimestamp *# Increase the minimum number of selectable sources required to adjust
# the system clock.
#minsources 2# Allow NTP client access from local network.
#allow 192.168.0.0/16
allow 0.0.0.0/0   \\添加此行,允许所有客户端同步此服务器,可以根据实际情况,缩小范围,如:allow 192.168.0.0/24 如果是多个网段,则增加多个allow.
# Serve time even if not synchronized to a time source.
#local stratum 10# Specify file containing keys for NTP authentication.
keyfile /etc/chrony.keys# Get TAI-UTC offset and leap seconds from the system tz database.
leapsectz right/UTC# Specify directory for log files.
logdir /var/log/chrony# Select which information is logged.
#log measurements statistics tracking

配置防火墙

firewall-cmd --zone=public --add-port=123/udp --permanent
firewall-cmd --reload

启动chrony服务

systemctl restart chronyd

Centos 8 搭建时钟服务器相关推荐

  1. CentOs上搭建git服务器

    CentOs上搭建git服务器 首先安装setuptools wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0 ...

  2. centos下搭建dhcp服务器

    centos下搭建dhcp服务器 一.软件环境 CentOS release 6.5 dhcp-4.1.1-51.P1.el6.centos.x86_64 dhcp-common-4.1.1-51.P ...

  3. CentOS 下搭建svn服务器

    CentOS 下搭建svn服务器 安装SVN yum 安装 创建 svn 目录 svn 的目录结构 conf 中的设置[重点] 设置 authz 设置 passwd 设置 svnserve.conf ...

  4. linux(centOS)下搭建node服务器之一、 安装Node.js

    本例系统环境:腾讯云 CentOS 7.4 64位 一.找相应node版本,复制链接 1. 打开网址 http://nodejs.cn/download/; 2. ctrl+shift+i(打开开发者 ...

  5. CentOS下搭建Git服务器Gitosis

    说明:由于条件有限,我这里使用的是同一台centos的,但教程内容基本上通用. 1.编译安装git git安装教程:http://blog.haohtml.com/archives/10093 2.安 ...

  6. 在centos上搭建饥荒服务器

    用这篇文章记录一下我搭建饥荒服务器的过程,在阅读参考本文章前,您需要: 拥有安装CentOS的云服务器,使用其他操作系统在部署饥荒服务器的时候可能会出现问题 包含cluster_token的地图文件夹 ...

  7. CentOS 7搭建Web服务器

    尝试了两种CentOS 7安装模式,分别搭建Web服务器的过程. 字符界面:基本Web服务器(Basic Web Server) 这种模式已经包含了httpd服务,但是没有开放80端口,所以安装完成之 ...

  8. centos下搭建网站服务器,Centos7搭建web服务器

    搭建web服务器  提供网站服务 1.配置IP地址 vim /etc/sysconfig/network-scripts/ifcfg-ens33 2.  启动 network服务    查看IP地址 ...

  9. Linux(Centos)快速搭建SVN服务器

    2019独角兽企业重金招聘Python工程师标准>>> 一.SVN简介 SVN是Subversion的简称,是一个开放源代码的版本控制系统,相较于RCS.CVS,它采用了分支管理系统 ...

最新文章

  1. skype linux 安装,如何在Ubuntu 18.04上安装Skype
  2. linux bashrc与profile的区别
  3. 20180827-Java网络编程
  4. 安装adobe acrobat导致回滚
  5. TensorFlow 第一步 开门见山:Hello World!
  6. 计算机英语讲课笔记06
  7. Fragment容器Activity
  8. 探索性测试 之 极速测试
  9. 利用kaggle训练模型
  10. html页面转pdf
  11. 配置管理规范 配置管理计划_配置管理简介
  12. unity材质丢失素材变成粉红色的解决方法
  13. 最佳牛栏(前缀和+二分)
  14. PCA(主成分分析)数学原理推导证明
  15. Python好学吗?要学多久?
  16. 谷歌搜索技巧(可看全球眼或某些站密码)
  17. 【Note4】shell语法,ssh/build/scp/upgrade,环境变量,自动升级bmc,bmc_wtd,peci,软连接
  18. 基于机器学习的敏感信息泄露治理探索
  19. “智数据,创未来”——2018中国存储与数据峰会在京盛大举行
  20. ZYNQ PL采集AD7606数据PS LWIP发送

热门文章

  1. systemctl重新加载_【systemd】使用systemctl管理守护进程详细教程
  2. 微信小程序 302 错误码
  3. Nginx设置内外网前置机跳转
  4. 玩过贪吃蛇吗?5 分钟教你用 Python 实现贪吃蛇!
  5. 加密套件以及ECDH
  6. H5的新特性(详细汇总)
  7. C# 中object sender与EventArgs e
  8. mysql 存json中文乱码怎么设置_解决 MySQL 中文乱码
  9. android k主题,K主题(萌图锁屏)
  10. http常见的form表单请求方式