首页 > 系统相关 >使用Almalinux 8 搭建NTP服务器chrony

使用Almalinux 8 搭建NTP服务器chrony

时间:2024-02-06 17:01:46浏览次数:25  
标签:查看 Almalinux NTP sudo server chrony iburst ntp 服务器

chrony官方网站

https://chrony-project.org/


1、更新系统

sudo dnf update
sudo dnf install epel-release

2、在AlmaLinux上安装NTP服务器

dnf install chrony

systemctl enable chronyd
systemctl start chronyd

3、 配置服务器

vim /etc/chrony.conf

添加NTP服务器地址,如
server ntp.aliyun.com iburst
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst
server ntp.ntsc.ac.cn iburst

#重启服务
systemctl restart chronyd


4、查看状态

#查看时间源同步状态
chronyc sourcestats -v

#查看当前时间
date

#查看时间源是否在线
chronyc activity -v

# 查看时间源状态
chronyc sources -v

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current best, '+' = combined, '-' = not combined,
| /             'x' = may be in error, '~' = too variable, '?' = unusable.
||                                                 .- 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               
===============================================================================
^* dns2.synet.edu.cn             1   6   363    58    +11ms[  +11ms] +/-   24ms
^+ 139.199.214.202               2   6   377    55  +1379us[+1379us] +/-   39ms
^- stratum2-1.ntp.mow01.ru.>     2   6   377    59    +17ms[  +17ms] +/-   79ms
^- 119.28.206.193                2   6   176   189  +3506us[+3349us] +/-   54ms
^+ 203.107.6.88                  2   6   377    60  -8530us[-8434us] +/-   21ms
^+ 120.25.115.20                 2   6   277   118  +2670us[+2771us] +/-   26ms
^- 114.118.7.161                 1   7    25    56    +29ms[  +29ms] +/-   43ms


5、配置防火墙

sudo firewall-cmd --permanent --add-service=ntp
sudo firewall-cmd --reload



标签:查看,Almalinux,NTP,sudo,server,chrony,iburst,ntp,服务器
From: https://blog.51cto.com/u_748290/9629729

相关文章

  • vue3+elementplus+vuedraggable插件,实现左右拖拽移入,和上下拖拽排序
    先看目标效果(gif由迅捷gif工具制作,使用vscode可以打开gif,进行预览)效果分析1.左右区域,支持拖拽。左侧选项,拖入右边。可以新建大模块,也可以给模块新增一项。2.模块内部,支持拖拽排序,并按照排序,生成一个简单的层级。3.模块名字支持编辑。同时增加表单校验,名字不存在,则无法保存。......
  • eventPollerPool-Pipe 分析
    1.eventPoller分析1.1event设置:基本知识详见manepollLevel-triggeredandedge-triggered/水平触发和边沿触发/LT:水平触发没有标识;ET:边沿触发EPOLLET;默认触发方式是水平触发,什么标识都不用指定,如果要指定边沿触发,则指定为EPOLLET;参考文章:https://blog.......
  • ntpdate
    ntpdate使用网络计时协议(NTP)设置日期和时间补充说明ntpdate命令是用来设置本地日期和时间。它从指定的每个服务器获得了一些样本,并应用标准NTP时钟过滤器和选择算法来选择最好的样本。此ntpdate命令使用以下方法进行时间调整:如果它确定时钟偏差超过0.5秒,它通过调用s......
  • linux 开启ntp
    先确定有没有装ntp服务rpm-qantp如果没有安装,则需要部署ntp服务:yum2yum源IP ntp(如果本地有挂载yum源,直接yuminstallntp即可)1、修改/etc/ntp.conf内容,本目录下的配置拷过去进行修改。vim/etc/ntp.conf#创建日志路径#mkdir-p/data/ntpdata------------------......
  • Nessus 10.6 Auto Installer for RHEL 9/AlmaLinux 9/Rocky Linux 9 (updated Jan 202
    Nessus10.6AutoInstallerforRHEL9/AlmaLinux9/RockyLinux9(updatedJan2024)发布Nessus试用版自动化安装程序,支持macOSSonoma、RHEL9和Ubuntu22.04请访问原文链接:https://sysin.org/blog/nessus-auto-install-for-rhel-9/,查看最新版。原创作品,转载请保留出处......
  • 时间同步NTP和chronyc
    chronyc手动同步要进行手动同步,可以使用chronyc命令。以下是一些基本的使用方法:启动chronyd服务:在Linux系统中,可以通过运行systemctlenablechronyd.service和systemctlstartchronyd.service来启用并启动chronyd服务。1编辑配置文件:在需要同步的系统上,打开配置文件/etc......
  • 网络-华为、思科交换机配置TFTP自动备份、NTP时间同步、SYSLOG日志同步功能
    前言如今园区中交换机越来越多,传统的查看日志的方式是远程到交换机在命令行中查看,但是logbuffer中保存的容量有限,也不方便查询,耗费运维人员大量的经理,不好集中管理,syslog就为解决此问题,可以搭建一台syslog服务器(我使用群辉自带的功能),将日志集中收集起来。同样的交换机的配置也......
  • 北斗GPS卫星时钟服务器(NTP服务器)架构方法步骤
    北斗GPS卫星时钟服务器(NTP服务器)架构方法步骤北斗GPS卫星时钟服务器(NTP服务器)架构方法步骤京准电子科技官微——ahjzsz一、施工简介:应贵司要求,我司提供卫星时钟系统(NTP时钟同步服务器),为解决全网络计算机系统时间同步问题; 二、施工须知:1.使用本装置之前,请您仔细阅读用户手册......
  • Linux CentOS8 安装NTP时间服务器
    如何构建安装NTP服务器注意:sudoyuminstallntpntpdate-y//使用该命令在我的linux系统中无法安装ntp服务器因为在一些现代的Linux发行版中,chrony已经取代了传统的ntp作为默认的时间同步工具。我这里通过安装chrony来进行时间同步。使用以下命令:1、安装NTP服务器s......
  • 网络-华为、思科交换机配置TFTP自动备份、NTP时间同步、SYSLOG日志同步
    配置使用TFTP进行交换机配置的自动保存华为设备<Huawei-sw>sys[Huawei-sw]setsave-configurationinterval60delay3cpu-limit60[Huawei-sw]setsave-configurationbackup-to-serverserver<TFTP服务器IP>transport-typetftppath\Huawei-sw.zip[Huawei-sw]quit<H......