当前位置:网站首页>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 
边栏推荐
- [postgresql]postgresql custom function returns an instance of table type
- Deep search DFS + wide search BFS + traversal of trees and graphs + topological sequence (template article acwing)
- XAI+网络安全?布兰登大学等最新《可解释人工智能在网络安全应用》综述,33页pdf阐述其现状、挑战、开放问题和未来方向
- Global and Chinese market of full authority digital engine control (FADEC) 2022-2028: Research Report on technology, participants, trends, market size and share
- TLS environment construction and plaintext analysis
- Qt6 QML Book/Qt Quick 3D/基础知识
- JMeter plug-in installation
- Wireless network (preprocessing + concurrent search)
- Test access criteria
- How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
猜你喜欢

@Transactional注解失效的场景

What is the maximum number of concurrent TCP connections for a server? 65535?

Hcie security Day12: supplement the concept of packet filtering and security policy

2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions

Discussion Net legacy application transformation

强化學習-學習筆記1 | 基礎概念

Machine learning support vector machine SVM

18、 MySQL -- index

The 29th day of force deduction (DP topic)

【愚公系列】2022年7月 Go教学课程 002-Go语言环境安装
随机推荐
Print linked list from end to end
Sightseeing - statistics of the number of shortest paths + state transfer + secondary small paths
Rhcsa third day notes
Qtablewidget control of QT
Global and Chinese markets of cast iron diaphragm valves 2022-2028: Research Report on technology, participants, trends, market size and share
Shortest path problem of graph theory (acwing template)
Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
Global and Chinese markets of active matrix LCD 2022-2028: Research Report on technology, participants, trends, market size and share
Cap and base theory
It is discussed that the success of Vit lies not in attention. Shiftvit uses the precision of swing transformer to outperform the speed of RESNET
浅议.NET遗留应用改造
阻塞非阻塞和同步异步的区分 参考一些书籍
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
上周内容回顾
Plan for the first half of 2022 -- pass the PMP Exam
Pytorch sets the weight and bias of the model to zero
Rhcsa third day operation
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
Haven't expressed the artifact yet? Valentine's Day is coming. Please send her a special gift~
Analyse de REF nerf