当前位置:网站首页>Install and use Chrony, and then build your own time server
Install and use Chrony, and then build your own time server
2022-07-03 20:48:00 【1ta-chi】
List of articles
Preface
Here we use chrony To build a time server , Here we need to do some operations on the firewall , Let's just shut it down .
chrony brief introduction
chrony It's a ntp Protocol implementation program , It can be used as a server , It can also act as a client , It can keep the system clock synchronized with the clock server , Keep time accurate .
Anyway, he's better than NTP There are great advantages , We don't talk much , Go straight to work
install
yum install chrony -y

View existing files
rpm -ql chrony

Let's change the time to the wrong time , Used for testing
Start the service
systemctl start chronyd
chronyc sources

We can also write multiple time servers , Convenient for system query ( Time server address )
vim /etc/chrony.conf

* Represents the upper layer currently in use NTP
+ Successful connection , An alternate server that can provide time updates
- The NTP The server is considered unqualified
( If you play a bunch of question marks , It is suggested to try more )
Time server
We installed it on both operating systems chrony, Now try to get one of them to get time from the other
At this time, the host as the server should deal with the firewall and selinux Make some settings , For the convenience of the experiment , Let's just close
systemctl stop firewalld

close selinux Some files need to be modified
vim /etc/selinux/config

Close it now
setenforce 0

Let's make sure the server and client , And change the host name (hostname Host name )

At this time , Check the server's IP, test Ping(ping 192.168.32.128)
Sure Ping through , Will server's IP Write to the client chrony The configuration file (vim /etc/chrony.conf)
Restart the service !!!
After editing the configuration file, don't forget to restart the service
systemctl restart chronyd

Write the allowed access in the configuration file of the server (vim /etc/chrony.conf, All... Are allowed here )
Remember to restart the service
Modify the time of the client to the wrong time (date -s 10:00)
Use the time server to get the time (chronyc sources)
Remember to restart the service 
边栏推荐
- [Tang Laoshi] C -- encapsulation: member variables and access modifiers
- How can the outside world get values when using nodejs to link MySQL
- jvm jni 及 pvm pybind11 大批量数据传输及优化
- Gauss elimination solves linear equations (floating-point Gauss elimination template)
- 浅议.NET遗留应用改造
- 2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
- AI enhanced safety monitoring project [with detailed code]
- 《ActBERT》百度&悉尼科技大学提出ActBERT,学习全局局部视频文本表示,在五个视频-文本任务中有效!...
- 9 pyqt5 qscrollarea scroll area and qscrollbar scroll bar
- Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

Rhcsa third day notes

The "boss management manual" that is wildly spread all over the network (turn)
![[Tang Laoshi] C -- encapsulation: member variables and access modifiers](/img/be/0b38c0f1a27f819f7c79bcf634fbd4.jpg)
[Tang Laoshi] C -- encapsulation: member variables and access modifiers

2.5 conversion of different data types (2)
![AI enhanced safety monitoring project [with detailed code]](/img/a9/cb93f349229e86cbb05ad196ae9553.jpg)
AI enhanced safety monitoring project [with detailed code]

APEC industry +: father of the king of the ox mill, industrial Internet "king of the ox mill anti-wear faction" Valentine's Day greetings | Asia Pacific Economic media | ChinaBrand

QT6 QML book/qt quick 3d/ Basics

Rhcsa third day operation

The global industrial design revenue in 2021 was about $44360 million, and it is expected to reach $62720 million in 2028. From 2022 to 2028, the CAGR was 5.5%

An old programmer gave it to college students
随机推荐
Golang type assertion and conversion (and strconv package)
How to handle wechat circle of friends marketing activities and share production and release skills
Wireless network (preprocessing + concurrent search)
电子科技大学|强化学习中有效利用的聚类经验回放
Instructions for common methods of regular expressions
Transformer structure analysis and the principle of blocks in it
Deep search DFS + wide search BFS + traversal of trees and graphs + topological sequence (template article acwing)
强化學習-學習筆記1 | 基礎概念
"Designer universe" argument: Data Optimization in the design field ultimately falls on cost, safety and health | chinabrand.com org
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
阻塞非阻塞和同步异步的区分 参考一些书籍
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
Discussion Net legacy application transformation
如临现场的视觉感染力,NBA决赛直播还能这样看?
@Transactional注解失效的场景
Cap and base theory
How can the outside world get values when using nodejs to link MySQL
你真的知道自己多大了吗?
不同业务场景该如何选择缓存的读写策略?
Introduction to golang garbage collection