Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to synchronize CentOS Server with ntpdate

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to synchronize CentOS server with ntpdate". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to synchronize CentOS server with ntpdate".

If there are multiple CentOS servers running the same service and require high time accuracy, it is necessary to ensure that the time of multiple servers is uniform.

The simplest thing is that each server uses ntpdate to synchronize the time of the same network time server.

1. Enter ntpdate time.nist.gov synchronization network time

[root@localhost ~] # ntpdate time.nist.govMon Dec 17:11:43 ntpdate [5014]: adjust time server 207.200.81.113 offset-0.018788 sec

# # if the above shows that the synchronization is successful, you can open the Beijing time and check it for 1 second.

Note: if the prompt command does not exist, directly enter: yum install ntp-y to install the ntp package.

2. Set up crontab scheduled tasks to synchronize them automatically.

Enter the command crontab-e, press the keyboard letter "I" to enter the editing state, then copy any of the following plan contents to it as needed, and finally press the keyboard "ESC" and type ": wq!" Just save it.

[root@localhost] # crontab-e

# synchronize every hour

* * / 1 * ntpdate time.nist.gov

Or

# synchronize at 1: 00 a.m. Every Saturday

0 1 * 6 ntpdate time.nist.gov

If the above time.nist.gov server cannot be synchronized, you can try the following time servers:

Time.nist.govtime.nuri.net0.asia.pool.ntp.org1.asia.pool.ntp.org2.asia.pool.ntp.org3.asia.pool.ntp.org so far, I believe you have a deeper understanding of "how the CentOS server synchronizes with ntpdate". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report