A Method for Automatic Time Synchronization of CentOS Clusters

Source: Internet
Author: User

CentOS cluster automatic synchronization time a method before there is a log is manual synchronization time http://www.bkjia.com/ OS /201304/202456.html the reason for doing so, because our laboratory LAN only a part of the IP can access the Internet, the IP address used by the server cannot be connected to the Internet, and the time cannot be synchronized from the Internet. Therefore, you have to set up an ntp server locally and synchronize the time from the server. However, there was a power outage in the lab last night. After the server was started up this morning, it was found that there was a lot of time difference (the desktops that were used as servers were 5 or 6 years old, and it was estimated that the CMOS batteries were not working ). It is very troublesome to manually synchronize the time on one platform (execute ntpdate xxx. So I tried a method that I could think of in my head. I didn't know how to do this well. I hope you can give me some advice. Run the following command on a machine other than ntpd: [html] # chkconfig -- list | grep ntpd: Check whether ntpd is automatically started upon startup (if it is displayed as off, it indicates that it is not automatically started upon startup). If it is automatically started upon startup, run the following command: [html] # chkconfig ntpd off to disable ntpd. If ntpd is on, ntpdate cannot be synchronized from other servers. Then in/etc/rc. local (debian/ubuntu may be/etc/rc. d/rc. add a line at the end: [html] ntpdate xxx. xxx. xxx. xxx indicates the IP address of the server that runs ntpd and then restarts.

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.