chrony简单介绍

简介: 简单介绍

1、简单介绍


2、服务安装


2.1、安装服务


apt install chrony


2.2、参数配置


sed -i  's@server@#server@g' /etc/chrony.conf

echo -e  "server ntpupdate.tencentyun.com iburst" >> /etc/chrony.conf


# Use public servers from the pool.ntp.org project.

# Please consider joining the pool (http://www.pool.ntp.org/join.html).

# servers

server ntpupdate.tencentyun.com 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


# Serve time even if not synchronized to a time source.

#local stratum 10


# Specify file containing keys for NTP authentication.

#keyfile /etc/chrony.keys


# Specify directory for log files.

logdir /var/log/chrony


# Select which information is logged.

#log measurements statistics tracking


3、开始同步


3.1、设置时区


timedatectl set-timezone Asia/Shanghai


3.2、开启ntp同步


timedatectl set-ntp yes


3.3、开始同步


systemctl restart chrony


chronyc sources


root@l:/data/liu/git/zgj_toutiao# systemctl restart chrony

root@l:/data/liu/git/zgj_toutiao# chronyc sources

210 Number of sources = 5

MS Name/IP address         Stratum Poll Reach LastRx Last sample              

===============================================================================

^? 169.254.0.79                  2   6     1     2    -26us<span class="token punctuation">[  -26us<span class="token punctuation">] +/-   22ms

^? 169.254.0.80                  2   6     1     1  +1309ns<span class="token punctuation">[+1309ns<span class="token punctuation">] +/-   26ms

^? 169.254.0.81                  2   6     1     1   -103us<span class="token punctuation">[ -103us<span class="token punctuation">] +/-   28ms

^? 169.254.0.82                  2   6     1     1    +62us<span class="token punctuation">[  +62us<span class="token punctuation">] +/-   39ms

^? 169.254.0.83                  2   6     1     1   -356us<span class="token punctuation">[ -356us<span class="token punctuation">] +/-   37ms

相关文章
|
SQL 流计算
对于Flink CDC,当源表的数据被删除后,可以通过以下方法在结果表中同步删除
对于Flink CDC,当源表的数据被删除后,可以通过以下方法在结果表中同步删除
1790 1
|
7月前
|
存储 安全 Linux
OpenClaw 阿里云/本地部署与核心Skill精选指南|实用技能组合及免费模型配置方案
OpenClaw作为轻量化可扩展的AI智能体框架,凭借灵活的技能扩展机制与稳定的执行能力,成为日常办公、信息处理、自动化任务执行的优选方案。面对数量丰富的技能组件,无需盲目安装,选用经过广泛验证的高频实用技能,即可覆盖绝大多数日常使用场景,同时保持系统简洁稳定。本文结合实际使用需求,整理适配日常场景的核心技能组合,说明各项技能的作用与价值,并完整提供阿里云环境部署、MacOS、Linux、Windows11本地部署流程,以及阿里云百炼Coding Plan免费大模型API配置方式,同时梳理使用过程中的常见问题,形成一套可直接落地的OpenClaw使用方案。
450 0
|
存储 弹性计算 安全
使用OSS上传下载文件
阿里云对象存储OSS(Object Storage Service)是一款海量、安全、低成本、高可靠的云存储服务,可以提供多种用途,最简单的使用方式是做文件存储,用来上传下载文件啊
5152 0
使用OSS上传下载文件
|
安全 Linux 虚拟化
Rocky Linux 10 - RHEL 100% 1:1 兼容免费发行版
Rocky Linux 10 - RHEL 100% 1:1 兼容免费发行版
1204 34
Rocky Linux 10 - RHEL 100% 1:1 兼容免费发行版
|
10月前
|
运维 Linux 网络安全
RockyLinux httpd服务管理(手把手教你轻松配置与控制Apache Web服务器)
本文详细介绍RockyLinux中httpd服务的管理方法,涵盖安装、启动、停止、重启、开机自启、防火墙配置及服务状态检查,帮助用户快速搭建并管理Apache Web服务器,适合初学者和运维人员学习使用。
|
安全 Linux iOS开发
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
938 0
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
|
存储 网络协议 算法
基于 Wireshark 分析 ICMP 协议
基于 Wireshark 分析 ICMP 协议
|
Linux
CentOS U盘挂载指南
在 CentOS 中挂载 U 盘的步骤如下:1. 使用 `sudo fdisk -l` 或 `lsblk` 检测 U 盘设备(如 `/dev/sdb1`)。2. 创建挂载点 `sudo mkdir /mnt/usb`。3. 根据格式挂载 U 盘,如 FAT32 使用 `sudo mount -t vfat /dev/sdb1 /mnt/usb -o rw,uid=1000,gid=1000`。4. 访问数据 `cd /mnt/usb && ls -l`。5. 卸载 `sudo umount /mnt/usb`。常见问题包括权限和中文乱码,可添加相应参数解决。
1429 2

热门文章

最新文章