CentOS/Linux automatic server synchronization time

Source: Internet
Author: User
Tags server installation and configuration

CentOS/Linux automatic server synchronization time

The newly installed CentOS system server may have an incorrect time, which is very important during cluster creation. It is very likely that the cluster will fail due to time, therefore, you need to adjust the time zone and time. As follows, the CentOS system uses NTP to synchronize time from a time server so that the time is synchronized at regular intervals.

NTP: Short for Network Time Protocol, which is a standard Internet Protocol used for Time synchronization on the Internet. NTP is used to synchronize computer time to a certain time standard. The current Time standard is Universal Time Coordinated ).

Perform the following steps to synchronize time in the CentOS system:

1. Download ntpdate
Note: Some versions do not contain ntpdate, so you need to download
# Yum install-y ntpdate

2. Change the time zone to Shanghai, that is, Beijing time + Zone 8.
Note: You can check the/usr/share/zoneinfo directory if you want to change the time zone.
# Cp/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
# Yes | cp-f/usr/share/zoneinfo/Asia/Shanghai/etc/localtime

3. Use NTP to synchronize time
# Ntpdate us.pool.ntp.org

4. timed synchronization time (clock synchronization every 10 minutes)
# Crontab-l>/tmp/crontab. bak
# Echo "*/10 *****/usr/sbin/ntpdate us.pool.ntp.org | logger-t NTP">/tmp/crontab. bak
# Crontab/tmp/crontab. bak

In this way, the time problem is solved.

CentOS NTP server installation and configuration

NTP servers in Linux

NTP client configurations for multiple operating systems

Build an enterprise-level NTP Time Server

Set up an ntp time synchronization server in Linux

Enable NTP time server in CentOS 6.3

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.