In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to build a time server, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
1. Environmental requirements (chrony should be installed on both the client and server)
Two or more virtual machines are needed to act as servers and clients, all of which must have a yum source, and then install ntp separately. Because I use CentOS8, the download command is: yum install-y chrony
* * Note: * * I had a lot of problems when installing the yum source. I wasted a lot of time installing the Yum source in one way, and the installation was not successful. Later, I borrowed the classmate's method and succeeded. Record the successful installation process here:
a. First cd / etc/yum.repos.d/ take a look at the configuration file:
b. Delete these original Yum sources: rm-rf *
c. Check your own mirror version and go to the relevant website to download the matching yum source.
The website here is: https://developer.aliyun.com/mirror/?spm=a2c6h.25603864.0.0.50154ccaMggZGI, just copy the corresponding command
d. To install the Yum source, the command is:
Curl-o / etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
If your mirror version is centos8, you can copy my command directly.
e. Test and install ntp (basically chrony after CentOS7) to see if the yum source is installed successfully.
At this point, the yum source is finally available
2. Find a reliable time server address
This step is searched on Baidu. I use ntp1.aliyun.com here.
After you find the right address, first use the virtual machine ping to see if it can be connected, and you can use it if you can.
3. Edit the chrony configuration file on the server
The command is vim chrony.conf
At this time, the first line of white text is a time server address he gave you, but we need to use our virtual machine to test whether we can ping before we can use it.
My result is that I can Ping, but it is relatively slow, because it is a foreign website.
Start the chronyd service and verify the time
Thank you for reading this article carefully. I hope the article "how to build a time server" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.