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 time

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

Share

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

This article mainly introduces "how to synchronize CentOS time". In daily operation, I believe many people have doubts about how to synchronize CentOS time. The editor consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to synchronize CentOS time"! Next, please follow the editor to study!

The steps for CentOS system time synchronization are as follows:

The newly installed CentOS system server may be set up incorrectly and need to adjust the time zone and time.

The following is that the CentOS system uses NTP to synchronize from a time server

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:

Yum install-y ntpdate

Join the scheduled task and synchronize the clock every 10 minutes

Crontab-e

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

At this point, the study on "how to synchronize CentOS time" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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