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

Then use ntp to update the centos system time from the time synchronization server

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 "then use ntp to update the centos system time from the time synchronization server", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "then use ntp to update the centos system time from the time synchronization server"!

The steps for CentOS system time synchronization are as follows:

The code is as follows:

Cp / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

Ntpdate us.pool.ntp.org

It's easy!

The first sentence is to adjust the current time zone to Shanghai that is + 8. If you want to change other time zones, you can also take a look at the / usr/share/zoneinfo directory.

Then the second sentence is to use ntpdate to synchronize standard time.

For those who do not have ntpdate installed, you can yum:

The code is as follows:

Yum install-y ntpdate

Join the scheduled task and synchronize the clock every 10 minutes

The code is as follows:

Crontab-e

0-59 take 10 * / usr/sbin/ntpdate us.pool.ntp.org | logger-t NTP

In this way, we can solve the problem of inaccurate time in CentOS system.

Thank you for reading, the above is the content of "then use ntp to update the time of the centos system from the time synchronization server". After the study of this article, I believe you have a deeper understanding of the problem of updating the time of the centos system from the time synchronization server using ntp, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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