A method for automatic time synchronization of CentOS clusters
Source: Internet
Author: User
One way to automatically synchronize time for CentOS clusters is to manually synchronize time logs... centOS cluster automatic synchronization time a method before there is a log is Manual synchronization time http://www.2cto.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.
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