当前位置:网站首页>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
边栏推荐
- University of Electronic Science and technology | playback of clustering experience effectively used in reinforcement learning
- Global and Chinese markets for medical temperature sensors 2022-2028: Research Report on technology, participants, trends, market size and share
- Machine learning support vector machine SVM
- Instructions for common methods of regular expressions
- Cannot load driver class: com. mysql. cj. jdbc. Driver
- Such as the visual appeal of the live broadcast of NBA Finals, can you still see it like this?
- Hcie security Day12: supplement the concept of packet filtering and security policy
- Apprentissage intensif - notes d'apprentissage 1 | concepts de base
- MySQL dump - exclude some table data - MySQL dump - exclude some table data
- jvm jni 及 pvm pybind11 大批量数据传输及优化
猜你喜欢
Go learning notes (4) basic types and statements (3)
In 2021, the global revenue of syphilis rapid detection kits was about US $608.1 million, and it is expected to reach US $712.9 million in 2028
AI enhanced safety monitoring project [with detailed code]
Gee calculated area
How to choose cache read / write strategies in different business scenarios?
Interval product of zhinai sauce (prefix product + inverse element)
Basic knowledge of dictionaries and collections
thrift go
18、 MySQL -- index
@Transactional注解失效的场景
随机推荐
Basic knowledge of dictionaries and collections
String and+
【c】 Digital bomb
Line segment tree blue book explanation + classic example acwing 1275 Maximum number
MDM mass data synchronization test verification
Operate BOM objects (key)
全网都在疯传的《老板管理手册》(转)
上周内容回顾
Scientific research document management Zotero
How can the outside world get values when using nodejs to link MySQL
JMeter plug-in installation
【leetcode】1027. Longest arithmetic sequence (dynamic programming)
An old programmer gave it to college students
Test panghu was teaching you how to use the technical code to flirt with girls online on Valentine's Day 520
[Yugong series] go teaching course 002 go language environment installation in July 2022
Gauss elimination solves linear equations (floating-point Gauss elimination template)
2166. Design bit set
In 2021, the global revenue of thick film resistors was about $1537.3 million, and it is expected to reach $2118.7 million in 2028
Go learning notes (4) basic types and statements (3)
In 2021, the global foam protection packaging revenue was about $5286.7 million, and it is expected to reach $6615 million in 2028