Configure NTP to synchronize server time

Source: Internet
Author: User
Tags net time

Configure NTP to synchronize server time

More and more servers in the project, and recently in a few servers to synchronize the database, synchronization error to look at the log, and then found a small problem has been neglected---several servers time inconsistent.

The data is then consulted, and the decision is made to use NTP (Network time Protocol, Internet Protocol ) -a protocol used to synchronize the time of each computer in the network. Its purpose is to synchronize the computer clock to the World coordinated UTC, its accuracy in the LAN up to 0.1ms, in most places on the Internet its accuracy can reach 1-50ms. To implement time synchronization for several servers.

The idea is simple, is to make one of the servers into a time server, and then other servers to do time calibration according to it. Here are the specific practices:

First, the service side settings:

Because WINDOWS SERVER 2008 works as an NTP client by default, you must modify the registry so that the system runs as an NTP server. Note that you should back up the registry file before working.

1, through the Start menu, enter the regedit command to open the Registry Settings screen, at this time, please make sure to back up the registry file.

2. Modify the key values of the following options

Hkey_local_machine\system\currentcontrolset\services\w32time\timeproviders\

"enabled" set to 1 in NtpServer, turn on NTP server function

3. Modify the following key values

Hkey_local_machine\system\currentcontrolset\services\w32time\config\

The AnnounceFlags is set to 5, which forces the host to announce itself as a reliable time source, thereby using the built-in complementary metal oxide semiconductor (CMOS) clock.

4. Execute the following command at the DOS command line to make sure the above changes work

Netstop W32Time

Netstart W32Time

Referral plan; If the server is connected to the Internet, it is best to append the following configuration to avoid NTP synchronization on the server and the Internet:

Hkey_local_machine\system\currentcontrolset\services\w32time\timeproviders\

NtpClient's "enable" is set to 0 to prevent automatic synchronization of the external time service as a client

Second, customer settings:

1. Specify the primary time server. In DOS type "NET time/setsntp:ntp.sjtu.edu.cn", here we specify ntp.sjtu.edu.cn is the main time server, can also be a different address (210.72.145.44).

2, free set time synchronization interval: (Can not do)

Hkey_local_machine\system\currentcontrolset\services\w32time\timeproviders\

NtpClient's "specialpollinterval" default setting is 604800 (or 86400)

Third, the synchronization settings

Click Update Now, and then the PC will show that the synchronization was successful.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Configure NTP to synchronize server time

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.