CentOS Time synchronization problem

Source: Internet
Author: User

The question troubled the river for days. The consensus did not arouse my attention. Because, I manage the code through SVN, I need to update the source code from the SVN server. But sometimes, my code has been submitted, but updated on another machine when prompted, not this version.

Study for half a day, the original is my virtual machine on the date is slower than the SVN server to cause. My general solution is to reset the time by date to resolve. But after a while, the time on the virtual machine is slow.

===================

No need to find a way to solve it:

Install the Ntpdate command

[[email protected] ~]# Yum install NTP
After the installation is complete, you do not need to make any settings, just execute the following command. Time to pull time.nist.gov by command

[[email protected] ~]# ntpdate time.nist.gov16 Jul 13:39:35 ntpdate[1692]: Step time server 128.138.141.172 offset 2.36113 8 sec
If you can pull the success, it proves that the installation is not a problem.

Put the command into the crontab

[[email protected] ~]# Vi/etc/crontab Add the following configuration to the crontab, pull once every 10 minutes */10 * * * * ntpdate time.nist.gov
[Email protected] ~]# chkconfig Crond on
Set the Crond to boot up.

===================

Reference article:

Http://www.centoscn.com/CentOS/config/2013/1017/1878.html

http://www.72xit.com/499.jsp

CentOS Time synchronization problem

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.