A stupid way to synchronize time between linux hosts in a LAN

Source: Internet
Author: User
A stupid way to synchronize time between linux hosts in the LAN. in the past few days, a small cluster of eight nodes has been built in the lab using a obsolete pc to conduct an experiment on hama, from re-assembling the hardware to installing the system and configuring the cluster, after two days of busy working, it is full of gray. When installing a cluster, you often need to synchronize between nodes... A stupid way to synchronize time between linux hosts in the LAN. in the past few days, a small cluster of eight nodes has been built in the lab using a obsolete pc to conduct an experiment on hama, from re-assembling the hardware to installing the system and configuring the cluster, after two days of busy working, it is full of gray. During cluster installation, you often need to synchronize the system time between nodes. for example, in an hbase cluster, a large time difference may cause a strange problem. for small clusters with several nodes, you can use NTP (network time protocol) to synchronize the time, and manually select a machine in the Lan as the ntp server, you need to install and start ntpd on this machine. to disable ntpd on other machines, install both software on ntpdate centos6.3. you only need to enable or disable ntpd as needed. Note that ntpd of other machines must be disabled: [html] # service ntpd stop modify/etc/ntp on the ntp server. conf, with the following configuration: [html] server 127.127.1.0 fudge 127.127.1.0 stratum 10, which number is between 0 and 15, in this way, the local time of this machine is provided as the ntp service to the client to restart ntpd: [html] # service ntpd restart for five or six minutes, so that ntpd can complete its own time synchronization, during which the following can be used: [html] # watch ntpq-p to check the status. when the number of 6th columns reaches 17, you can check the status. The waiting time is the number of seconds of the poll column 5th multiplied by 5. Then run [html] # ntpdate xxxx on another machine. xxxx is the IP address or host name of the ntp server. you can also set the time for automatic synchronization.
 
Related Article

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.