当前位置: 首页 > news >正文

通过自构建的时间服务器主机给客户端主机同步时间

主机

1.网络

ip a --->192.168.217.133/24

2.关闭防火墙 关闭selinux

[root@yyy ~]# systemctl stop firewalld
[root@yyy ~]# setenforce 0

3./etc/chrony.conf
 

vim /etc/chrony.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).
#pool 2.rhel.pool.ntp.org iburst
server ntp.aliyun.com iburst
# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

# Allow NTP client access from local network.
allow 192.168.217.129/24

# Serve time even if not synchronized to a time source.
local stratum 10

4.重启服务

[root@yyy ~]# systemctl restart chronyd

 

客户端

1.网络

192.168.217.129/24

2./etc/chrony.conf

vim /etc/chrony.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (https://www.pool.ntp.org/join.html).
server 192.168.217.133 iburst

# Use NTP servers from DHCP.
sourcedir /run/chrony-dhcp

# Record the rate at which the system clock gains/losses time.
driftfile /var/lib/chrony/drift

3.重启服务

[root@yyy ~]# systemctl restart chronyd

4.检验

[root@yyy ~]# chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* 192.168.217.133               3   6    17    12    +11us[  +38us] +/-   23ms
 

http://www.dtcms.com/a/520096.html

相关文章:

  • [特殊字符] 软考架构师 vs. 考研408:全方位对比
  • C语言进阶:(一)深度剖析函数栈帧:从创建到销毁
  • 零基础从头教学Linux(Day 55)
  • 哪里有学做ppt的网站资阳的网站建设
  • Apple 开源FastVLM:AI看图说话更快更准
  • 交互式UTM坐标查询工具:让地理坐标转换变得简单
  • 初学者小白复盘15之指针(4)
  • 轻量级且简单的 macOS 应用 Forklift for mac
  • 和平板电脑厂商定制智慧养老平板有那种合作模式?
  • 无人机安防体系的音视频超低延迟重构:从“空地融合”到“实时智控”
  • 做网站推广业务怎么样专业仿站网站建设
  • 三分钟部署最新开源大模型!Amazon SageMaker JumpStart 生成式 AI 实战指南
  • AWS云服务故障复盘——从故障中汲取的 IT 运维经验
  • Adobe Dimension 2025 (3D可视化设计神器) 解锁版
  • CUDA安装备忘录
  • 泰安网站建设流程软文营销文章300字
  • 医院为什么要做门户网站建设无锡专业网站推广
  • freeRTOS学习
  • K8s 集群环境搭建 - yaml 版本(一)
  • RAM和ROM的定义和区别总结!!!
  • GELU(高斯误差线性单元)激活函数全面解析
  • 企业网站可以做淘宝客吗wordpress 用户密码加密
  • WordPress + React 无头架构搭建指南
  • 聚类算法实战:从 KMeans 到 DBSCAN
  • 网站信息登记表网络营销考试题及答案
  • 宁夏建设工程招投标管理中心网站工程建设标准化期刊网站
  • 网站建设模板ppt模板微信公众网站开发
  • ElasticSearch倒排索引、ES核心概念、JAVA集成ES操作
  • window安装Elasticsearch(es)
  • 【AI编程实战】零基础用ChatGPT+Cursor开发完整Web应用:30分钟从idea到上线