当前位置:网站首页>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 
边栏推荐
- MySQL learning notes - single table query
- Gauss elimination solves linear equations (floating-point Gauss elimination template)
- 6006. Take out the minimum number of magic beans
- 2.5 conversion of different data types (2)
- [postgresql]postgresql custom function returns an instance of table type
- 11-grom-v2-05-initialization
- Wargames study notes -- Leviathan
- Use of CMD command
- Global and Chinese market of full authority digital engine control (FADEC) 2022-2028: Research Report on technology, participants, trends, market size and share
- 2.4 conversion of different data types
猜你喜欢

设计电商秒杀系统

Q&A:Transformer, Bert, ELMO, GPT, VIT

In 2021, the global foam protection packaging revenue was about $5286.7 million, and it is expected to reach $6615 million in 2028

Transformer structure analysis and the principle of blocks in it

Test panghu was teaching you how to use the technical code to flirt with girls online on Valentine's Day 520

Design e-commerce seckill system

Go learning notes (4) basic types and statements (3)

一台服务器最大并发 tcp 连接数多少?65535?

Node MySQL serialize cannot rollback transactions

How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
随机推荐
JMeter plug-in installation
How to set the system volume programmatically- How to programmatically set the system volume?
LabVIEW training
Cannot load driver class: com. mysql. cj. jdbc. Driver
Phpexcel import export
2166. Design bit set
QT tutorial: signal and slot mechanism
Wargames study notes -- Leviathan
Machine learning support vector machine SVM
2.6 formula calculation
TLS environment construction and plaintext analysis
Shortest path problem of graph theory (acwing template)
Do you really know how old you are?
浅议.NET遗留应用改造
Kubernetes 通信异常网络故障 解决思路
QT6 QML book/qt quick 3d/ Basics
JVM JNI and PVM pybind11 mass data transmission and optimization
2022 melting welding and thermal cutting examination materials and free melting welding and thermal cutting examination questions
2022 low voltage electrician examination and low voltage electrician simulation examination question bank
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share