网络时间服务与chrony

网络时间同步和Chrony服务器 而Chrony是一个开源的NTP实现,它提供了高精度的时间同步,并具有优化网络传输和资源利用的功能。服务器被配置为提供时间信息,而客户端则通过与服务器进行通信来同步自己的时钟。通过使用网络时间服务和Chrony服务器,您可以轻松实现计算机之间的时间同步。在大多数Linux发行版中,可以使用包管理器来安装Chrony。在配置文件中,您可以指定允许访问Chrony服务器的客户端和网络。此外,您还可以添加其他NTP服务器以提高时间同步的准确性。请注意,上述示例中的配置和命令可能因操作系统和Chrony版本而异。 阅读详情

防火墙iptable、selinux、时间同步 是配置主机的基础

初始化:

  1. 关闭SELinux
  2. 关闭iptables,firewalld
  3. 配置chrony

时间同步

NTP(Network Time Protocol,网络时间协议)是用来使网络中的各个计算机时间同步的一种协议。它的用途是把计算机的时钟同步到世界协调时UTC,其精度在局域网内可达0.1ms,在互联网上绝大多数的地方其精度可以达到1-50ms

时间同步实现工具

  • ntp:精度在局域网内可达0.1ms,在互联网上精度在1-50ms,但是同步时间长,逐渐同步

  • chrony:实现NTP协议的软件,在互联网同步两台机器之间的精度在几毫秒,在LAN中,精度为几十微秒。CentOS7后系统自带

  • 两者本质既是客户端也是服务器,客户端持续运行

clock与date命令的区别:
  • clock是显示硬件时间

  • data是显示操作系统时间,在没有配置网络时间的情况下,data会读取硬件时间

NTP

ntp stratum levels

NTP服务是利用NTP协议提供时间同步服务的

NTP服务安装

yum install ntp -y

NTP配置

备份配置文件

[root@localhost ~]#cp /etc/ntp.conf{,.bak}
[root@localhost ~]#ls /etc/ntp.conf*
/etc/ntp.conf  /etc/ntp.conf.bak

查看配置文件

# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).

driftfile /var/lib/ntp/drift

# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
# 不允许其他主机查询我的主机时间并修改
# restrict default nomodify notrap nopeer noquery

# Permit all access over the loopback interface.  This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ::1

# Hosts on local network are less restricted.
# 允许内网其他机器同步时间
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# 指定互联网上时间服务器进行时间同步服务,iburst提高时间同步效率
# server 0.centos.pool.ntp.org iburst
# server 1.centos.pool.ntp.org iburst
# server 2.centos.pool.ntp.org iburst
# server 3.centos.pool.ntp.org iburst

# 其他主机和此主机时间同步,可以将IP设置为该主机IP

# 自己指定同步阿里云的ntp服务器
server ntp1.aliyun.com iburst
server ntp2.aliyun.com iburst

#broadcast 192.168.1.255 autokey    # broadcast server
#broadcastclient            # broadcast client
#broadcast 224.0.1.1 autokey        # multicast server
#multicastclient 224.0.1.1      # multicast client
#manycastserver 239.255.254.254     # manycast server
#manycastclient 239.255.254.254 autokey # manycast client

# 允许上层时间服务器主动修改本机时间
restrict time1.aliyun.com  nomodify notrap noquery
restrict ntp1.aliyun.com  nomodify notrap noquery

# 外部时间服务器不可用时,以本地时间作为时间服务
server  127.127.1.0    
fudge   127.127.1.0 stratum 10

# Enable public key cryptography.
#crypto

includefile /etc/ntp/crypto/pw

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography. 
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8

# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats

# Disable the monitoring facility to prevent amplification attacks using ntpdc
# monlist command when default restrict does not include the noquery flag. See
# CVE-2013-5211 for more details.
# Note: Monitoring will not be disabled with the limited restriction flag.
disable monitor

iburst 选项

# 一次发送8个数据包

启动ntp服务

[root@localhost ~]#service ntpd status
Redirecting to /bin/systemctl status ntpd.service
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

[root@localhost ~]#chkconfig ntpd on
Note: Forwarding request to 'systemctl enable ntpd.service'.
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.

[root@localhost ~]#service ntpd start
Redirecting to /bin/systemctl start ntpd.service

[root@localhost ~]#service ntpd status
Redirecting to /bin/systemctl status ntpd.service
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2020-06-03 09:59:17 CST; 2s ago
  Process: 9790 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 9793 (ntpd)
    Tasks: 1
   CGroup: /system.slice/ntpd.service
           └─9793 /usr/sbin/ntpd -u ntp:ntp -g

Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen and drop on 1 v6wildcard :: UDP 123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen normally on 2 lo 127.0.0.1 UDP 123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen normally on 3 ens33 192.168.33.128 UDP 123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen normally on 4 virbr0 192.168.122.1 UDP 123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen normally on 5 lo ::1 UDP 123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listen normally on 6 ens33 fe80::298d:cfea:e788:42...123
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: Listening on routing socket on fd #23 for interfac...tes
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: 0.0.0.0 c016 06 restart
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: 0.0.0.0 c012 02 freq_set kernel 0.000 PPM
Jun 03 09:59:17 localhost.localdomain ntpd[9793]: 0.0.0.0 c011 01 freq_not_set
Hint: Some lines were ellipsized, use -l to show in full.


设置ntpd为开机启动

[root@localhost ~]#systemctl enable ntpd

查看同步情况

[root@localhost ~]#ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*120.25.115.20   10.137.53.7      2 u    5   64    1   18.014   -7.647   0.454
# 带*说明同步了

ntp服务停止

[root@localhost ~]#service ntpd stop

chrony

chrony-1

chrony是一个开源的自由软件,它能保持系统时钟与时钟服务器(NTP)同步,让时间保持精确。

它由两个程序组成:chronyd和chronyc。

chronyd是一个后台运行的守护进程,用于调整内核中运行的系统时钟和时钟服务器同步。它确定计算机增减时间的比率,并对此进行补偿。

chrony是CentOS7.x上自带的时间同步软件

配置chrony服务,实现服务器时间自动同步

chrony服务安装

# 查询是否存在chrony
[root@localhost ~]#rpm -q chrony
chrony-3.4-1.el7.x86_64

# 不存在的话直接安装
yum install chrony -y

查看当前chrony服务状态

[root@localhost ~]#systemctl status chrony
Unit chrony.service could not be found.

启动chrony服务

[root@localhost ~]#systemctl start chronyd

设置为开机启动

[root@localhost ~]#systemctl enable chronyd

服务unit文件

/usr/lib/ststemd/system/chronyd.service

监听端口

323/udp
123/udp

配置文件

/etc/chrony.conf

chrony服务配置

chrony服务使用的配置文件为/etc/chrony.conf内容格式和ntp配置文件相似。

备份配置文件

[root@localhost ~]#cp /etc/chrony.conf{,.bak}
[root@localhost ~]#ls /etc/chrony.conf*
/etc/chrony.conf  /etc/chrony.conf.bak

查看配置文件内容

[root@localhost ~]#vim /etc/chrony.conf

  1 # Use public servers from the pool.ntp.org project.
  2 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
  3 #server 0.centos.pool.ntp.org iburst
  4 #server 1.centos.pool.ntp.org iburst
  5 server ntp1.aliyun.com iburst
  6 server ntp2.aliyun.com iburst
  7

  8 # Record the rate at which the system clock gains/losses time.
  9 driftfile /var/lib/chrony/drift
 10 
 11 # Allow the system clock to be stepped in the first three updates
 12 # if its offset is larger than 1 second.
 13 makestep 1.0 3
 14 
 15 # Enable kernel synchronization of the real-time clock (RTC).
 16 rtcsync
 17 
 18 # Enable hardware timestamping on all interfaces that support it.
 19 #hwtimestamp *
 20 
 21 # Increase the minimum number of selectable sources required to adjust
 22 # the system clock.
 23 #minsources 2
 24 
 25 # Allow NTP client access from local network.
 	# 允许哪个NTP客户端访问你的主机,当不能同步互联网服务器时,该主机无法作为时间服务器
 26 allow 192.168.0.0/16
 27 
 28 # Serve time even if not synchronized to a time source.
 	# 此无服务作为时间服务器主机,启动后,当与互联网联结断开时,该主机也可以作为时间服务器
 29 local stratum 10
 30 
 31 # Specify file containing keys for NTP authentication.
 32 #keyfile /etc/chrony.keys
 33 
 34 # Specify directory for log files.
 35 logdir /var/log/chrony
 36 
 37 # Select which information is logged.
 38 #log measurements statistics tracking

查看同步情况

[root@localhost ~]#chronyc sources -v
210 Number of sources = 4

  .-- 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               
===============================================================================
^- 5.79.108.34                   2   8   377   202  +1695us[+1695us] +/-  196ms
^- 94.130.49.186                 3   7   367   332    +12ms[  +13ms] +/-  118ms
^+ 203.107.6.88                  2   6   377    12  +1033us[+1033us] +/-   23ms
^* 120.25.115.20                 2   8   377   208  +1011us[+1620us] +/-   11ms

公共NTP服务

阿里云时间服务器

#阿里云提供了7个NTP时间服务器也就是Internet时间同步服务器地址

ntp1.aliyun.com
ntp2.aliyun.com
ntp3.aliyun.com
ntp4.aliyun.com
ntp5.aliyun.com
ntp6.aliyun.com
ntp7.aliyun.com

# windows类
time.pool.aliyun.com

pool.ntp.org 一个提供可靠易用的NTP服务的虚拟集群

cn.pool.ntp.org
0-3.cn.pool.ntp.org

大学ntp服务

s1a.time.edu.cn	#北京邮电大学
s1b.time.edu.cn	#清华大学
s1c.time.edu.cn	#北京大学

国家授时中心服务器

210.72.145.44

troubleshooting

506 Cannot talk to daemon
Visual studio 2013 配置 Halcon 13 (非抄袭) Visual studio 2013 配置 Halcon 13.0.2.2 (其他版本适用) 针对网上抄袭的配置方法均不可用,写了一篇亲试可行的配制方法。如下: 1.下载Halcon安装后(C:\Program Files\MVTec\HALCON-13.0) 添加环境变量,(按下win按键,键入“环境变量”,出现 “编辑系统环境变量”后按下enter即可打开,下方找到“环境变量”按钮)的系... 阅读详情

相关推荐

Maven的下载安装配置教程(详细图文)

目录 一、简单了解一下什么是Maven 二、maven的下载 三、maven的安装 四、maven的环境变量配置 五、setting文件配置 六、开发工具配置Maven 一、简单了解一下什么是Maven Maven就是一款帮助程序员构建项目的工具,我们只需要告诉Maven需要哪些Jar 包,它会帮助我们下载所有的Jar,极大提升开发效率。 1.Maven翻译为“专家“, ”内行”的意思,是著名Apache公司下基于Java开发的开源项目。 2.Maven项目对象模型(POM)是一..

bakelFF的博客 12万+

第147天学习打卡(Kubernetes 部署)

对象式编程语言: 以数据为中心,代码服务于数据 数据:对象 代码:方法 class:类 属性,方法 K8S api: REST API(http/https) resource -> object method: GET ,PUT ,POST, DELETE, PATCH… k8s:cluster,容器编排系统 核心任务:容器编排 容器:应用程序 Pod Controller, Deployment Kubernetes Network 部署要点 测试环境 可以使用

doudoutj的博客 989

LangChain入门(二)-通过 Google 搜索并返回答案

并复制他给我们生成 api key。(博主使用了GitHub账号登录)-邮箱验证-手机号验证-订阅-api-key。Serpapi 提供了 google 搜索的 api 接口。首先需要我们到 Serpapi 官网上注册一个用户,

Good Luck 1万+

Linux服务器时间同步配置

Linux服务器时间同步配置 以CentOS7 做时间服务器,其他服务器(Centos 6、RHEL7)同步该服务器时间 RHEL 7、CentOS 7 默认的网络时间协议 为Chrony 本教程时间服务器服务端主机名:CentOS7-Node3 IP:192.168.231.130 客户端1主机名...

weixin_30466953的博客 418

从零开始使用matlab实现EKF-SLAM算法(含完整代码)

扩展卡尔曼滤波器同步定位与建图 (EKF-SLAM) 算法建立在 EKF 的基础上,集成了 EKF 的功能,可解决机器人技术中最具挑战性的问题之一:同时定位与建图 (SLAM)。 EKF-SLAM采用EKF方法来同时估计机器人的状态和周围环境的布局,而无需事先了解位置。 这种双重功能对于在未知环境中运行的自主系统至关重要,使它们能够在绘制区域地图时有效导航。 EKF-SLAM 算法一直是自动驾驶车辆和机器人系统开发的基石,为处理现实世界环境中固有的不确定性提供了一个强大的框架。

mjmmm的博客 6635

SLUB DEBUG 检测slab 内存泄漏

文章介绍如何定位linux 内核中slab 内存泄漏。

一叶知秋的博客 1491

RHCSAday9-时间服务器练习

时间服务器同步

d19941106的博客 1387

数据中心GPU芯片性能参数速查表(Nvidia+国产算力卡)

本文提供了一份数据中心GPU芯片性能参数速查表,涵盖Nvidia与国产算力卡两大阵营。文章详细解读了算力、显存、互连技术及功耗等关键性能指标,并对比了A100、H100、昇腾910B等主流型号,旨在帮助用户根据AI训练、推理等实际场景,做出高效的硬件选型与成本评估决策。

a0b1c2d3的专栏 836

linux设置服务器时间同步,Linux服务器时间同步配置

以CentOS7 做时间服务器,其他服务器(Centos 6、RHEL7)同步该服务器时间RHEL 7、CentOS 7 默认的网络时间协议 为Chrony本教程时间服务器服务端主机名:CentOS7-Node3 IP:192.168.231.130客户端1主机名:RHEL7-Node1客户端2主机名:CentOS6-Node2服务端:先查询下chrony服务状态[root@CentOS7-...

weixin_33146437的博客 483

第4篇:使用 NModbus 库快速搭建 Modbus TCP 通信(从零开始用 C# 开发 Modbus 上位机)

本文介绍了如何使用 NModbus 库快速搭建 Modbus TCP 上位机通信程序。通过安装 NModbus4 NuGet 包,开发者可以轻松实现 Modbus TCP 连接,无需手动处理底层协议细节。文章详细演示了核心功能实现: 创建 TCP 客户端连接设备 读取保持寄存器(功能码0x03) 写入单个寄存器(功能码0x06) 关闭连接释放资源 提供完整C#示例代码,包含初始化连接、数据读写等关键操作,帮助开发者快速构建Modbus TCP通信应用。相比手动实现,NModbus库大幅简化了开发流程,特别适

这里只有干货:从 Modbus 通信到 MES 对接,从 YOLO 训练到工控机部署,带你搞定工业软件开发全流程。 1045

智能测试策略优化:平衡覆盖率、时间和资源

在软件开发过程中,测试是确保软件质量的关键环节。然而,测试工作往往面临着诸多挑战,其中如何在保证测试覆盖率的前提下,合理分配时间和资源是一个核心问题。本文章的目的在于探讨智能测试策略的优化方法,帮助软件测试团队在有限的时间和资源条件下,实现尽可能高的测试覆盖率。文章的范围涵盖了智能测试策略的核心概念、算法原理、数学模型、实际应用案例以及相关工具和资源等方面。本文将按照以下结构进行组织:首先介绍智能测试策略优化的背景和相关概念,包括核心术语和缩略词的定义;

AIGC应用创新大全的博客 620

chrony笔记

【代码】chrony笔记。

qq_25264217的博客 713

YOLOv13-SWC (ShiftWise Convolution) 完整移植与原理深度解析教程

YOLOv13-SWC模型移植与原理解析 本文详细介绍了YOLOv13-SWC模型的完整移植过程与核心技术原理。YOLOv13-SWC在YOLOv8架构基础上引入ShiftWise Convolution(SWC)模块,通过创新性的位移操作、重参数化大核卷积和LoRA分解技术,显著提升了模型性能。文章包含三个核心部分: 模型移植实现:包括配置文件创建、任务模块修改和核心代码实现,重点介绍了SWC模块的掩码机制和LoRA卷积分解策略。 ShiftWise操作原理:深入解析了将大核卷积分解为小核卷积位移组合的数

FJN110的博客 504

Kylin麒麟操作系统服务部署 | chrony网络时间服务

时区UTC:整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC,Universal Time Coordinated)。GMT:格林威治标准时间(Greenwich Mean Time)指位于英国伦敦郊区的皇家格林尼治天文台的标准时间因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分)CST:中国标准时间(ChinaStandard Time +0800 东八区时间)

深耕信创・网络・云原生领域 2451

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

Linux网络时间服务和chrony

网络时间服务和chrony 时间同步:多主机协作工作时,各个主机的时间同步很重要,时间不一致会造成很多重要应用的故障,如:加密协议,日志,集群等, 利用NTP(Network Time Protocol) 协议使网络中的各个计算机时间达到同步。目前NTP协议属于运维基础架构中必备的基本服务之一 时间同步实现:ntp,chrony ntp:将系统时钟和世界协调时UTC同步,精度在局域网内可达0.1ms,在互联网上绝大多数的地方精度可以达到1-50ms,项目官网:http://www.ntp.org chron

weixin_43570812的博客 402

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

总结:网络时间服务和chrony

时间同步实现:ntp,chrony ntp:将系统时钟和世界协调时UTC同步,精度在局域网内可达0.1ms,在互联网上绝大多数的地方精度可以达到1-50ms ntp [root@centos7 ~]# rpm -ql ntp /etc/ntp.conf #配置 /usr/sbin/ntpd #服务 host A #hostA既作为服务器又作为客服端 [root@centos6 ~]# vim /etc/ntp.conf #向aliyun同步时间 server ntp.ali

wauzy的博客 197

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

网络时间 ntp 和 chrony服务

时间同步:多主机协作工作时,各个主机的时间同步很重要,时间不一致会造成 很多重要应用的故障,如:加密协议,日志,集群等, 利用NTP(Network Time Protocol) 协议使网络中的各个计算机时间达到同步。目前NTP协议属于运维基础架构中必备的基本服务之一 时间同步实现:ntp,chrony ntp:(同步时间长)将系统时钟和世界协调时UTC同步,精度在局域网内可达0.1ms,在互联网上绝大多数的地方精度可以达到1-50ms,项目官网:http://www.ntp.org ntpdate和远程主

weixin_45697293的博客 902

网络时间服务-Chrony(如何实现时间同步)

多主机协作工作时,各个主机的时间同步很重要,时间不一致会造成很多重要应用的故障,如:加密协议,日志,集群等,利用NTP(Network Time Protocol) 协议使网络中的各个计算机时间达到同步。时间同步可用ntp包或chrony包实现,由于chrony包更精准,且同步效率高,因此推荐使用chrony包实现时间同步。#323为chrony端口,123为chrony自带的ntp端口,外界使用ntp同步时用123端口。3、客户端服务器192.168.37.6,192.168.37.17上的相关操作。

weixin_44515412的博客 2845

网络时间服务centos7 chrony

主从时间同步服务器 1、 概念chrony官网:https://chrony.tuxfamily.orgchrony官方文档:https://chrony.tuxfamily.org/documentation.html 包:chrony两个主要程序:chronyd和chronycchronyd:后台运行的守护进程,用于调整内核中运行的系统时钟和时钟服务器同步。它确定计算机增减时间的比率,并对此进...

weixin_33825683的博客 366

网络时间服务和chrony

网络时间服务和chronyntpchrony服务unit 文件监听端口配置文件chronyc命令 ntp 启动ntpd服务,并设置开机启动 service ntpd start chkconfig ntpd on 设置上游NTP服务器的地址,并记得把restrict default kod nomodify notrap nopeer noquery注释掉 vim /etc/ntp.conf #restrict default kod nomodify notrap nopeer noquery ...

枫叶斜阳的博客 377

网络时间服务ntp和chrony进行内外网时间同步

时间同步:多主机协作工作时,各个主机的时间同步很重要,时间不一致会造成很多重要应用的故障,如:加密协议,日志,集群等, 利用NTP(NetworkTime Protocol) 协议使网络中的各个计算机时间达到同步。目前NTP协议属于运维基础架构中必备的基本服务之一 时间同步实现:ntp,chrony ntp:将系统时钟和世界协调时UTC同步,精度在局域网内可达0.1ms,在互联网上绝大多数的地方...

weixin_34198797的博客 853

第二十章 网络时间服务和chrony

@TOC 实验一:时间同步 实验目的 系统时间、硬件时间的设定和修改;ntp、chrony实现时间同步。 前提准备 可用的centos6、7系统。 centos6 :192.168.37.6 centos7 :192.168.37.7 实验步骤 时间同步 【例1】date命令查看系统时间 csharp [root@6 ~]# date Tue J...

Soul_2016的博客 74

“精准同步!chrony服务端+客户端配置详解:阿里云时间源与本地网络实战”

nice!

Mine:19829102887@163.com 可以一起学习! 754

NTP /Chrony网络时间协议,时间同步服务

chronyc sources -v #若显显示^*表示客户端正在从服务端。实现时间同步,让设备时间与国际标准时间保持一致,毫秒级精度。#ntpdate -d 服务端ip #-d 显示详细信息。金融系统,订单系统,地图导航等服务都需要高精度的时间。补充命令-date:显示或修改系统时间。#在局域网中搭建ntp服务(服务端)#通过公网的ntp服务进行时间同步。设备日志,服务日志需要记录时间。#同步时间,需要ntp客户端。#允许特定网段的客户端同步。#在复制文件后加备份时间。#服务端同步时间的服务器。

sr20020305的博客 365

[ Linux ] CentOS 8下使用 chrony 进行服务器网络时间同步

所以如果你的linxu版本是CentOS 8或以上无法使用NTP,只能使用chrony来同步时间。原因是 CentOS linux版本是8.x.x,时间服务不支持ntpdate,取而代之的是。进行了同步时间后,依然时间是错误的,首先先进行检查时区是否正确。命令来check时间是否同步成功。

我在山城重庆,我希望能为这片软件沙漠地带贡献自己的一滴水,Stay tuned! 2152

ntp和chrony

网络时间服务 网络时间服务:ntp 和 chrony ntp 和 chrony 既可做客户端也可做服务器,需要时时开启与服务器同步,也需要时时等待客户端的连接,不同与c/s结构,作为客户端也要时时开启,因为需要时时与服务器同步。 ntp服务配置 ntp作为客户端 yum install ntp -y vim /etc/ntp.conf server ntp1.aliyun.com iburst...

studywinwin的博客 1795
上一篇: 【安全与加密】TCP-Wrapper与PAM模块
下一篇: centos7安装httpd,外部主机无法访问解决方案
FlamencaH
博客等级 码龄7年 13粉丝 40原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值