In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
NTP time synchronization is a kind of time synchronization network technology. At present, there are many kinds of time synchronization technologies, each of which has its own characteristics, and there are great differences in time synchronization accuracy among different technologies.
Common synchronization technology
Accuracy coverage of time synchronization technology
Shortwave time service 1: 10 milliseconds worldwide
Long wave time service region of 1 millisecond
GPS 5000ns global
Telephone dialing time service 100 milliseconds worldwide
Internet time Service (NTP) 1: 50ms worldwide
SDH transmission network delivers 100ns long distance
In addition, there are two relatively simple, low-precision Internet time protocols: Time Protocol (RFC868) and Daytime Protocol (RFC867), which can provide WAN time synchronization with 1s calibration accuracy.
In the win2012 R2 version, there is no internet Internet time, so you need to use another way to do time synchronization.
There are several scenarios:
First, there is no Windows domain environment
Each server in the cluster needs to be able to access the Internet first, and each server needs to do the following
Enable the NTP Client service
1. Open the command line terminal, type: gpedit.msc, and open the Group Policy Manager
2. Follow the path below: computer configuration\ Administrative templates\ system\ windows time Service\ time provider to find the server settings file
3. Double-click to configure Windows NTP client
4. Enter the IP address of the time server to be synchronized to (you can also enter the domain name) in the Ntp Server entry, and note that 0x9 or 0x1 is required; in the type item, select NTP; and click the apply-OK button.
5. Start the NTP client; enable the NTP client; click the apply-OK button
6. Execute the following command to update the group policy
Gpupdate / force
7. Check whether the W32Time service is started. The startup type is automatic.
Second, there is a Windows domain environment
You only need to operate on the domain controller, and the client in other domains do not need to be moved.
Change the method as in case 1, modify the group policy-"update group policy -" check whether the W32Time service is started
If Group Policy is set for client, then client applies the configuration of Group Policy instead of synchronizing time with the domain controller
Third, the environment without external network
If the server cannot be connected to the external network, and the current environment has a ntpd server
In step 4, you can change the address of ntp server to the address of the ntpd server in the intranet.
Note: Windows uses the ntpd command to synchronize time with the NTP server, that is, when the time difference between client and server is too big, client cannot synchronize with server
That is, whether there is a domain environment or no domain environment, whether with or without group policy
This is the same as Linux's ntpdate command ntpd command. Linux's ntpdate command can synchronize with server regardless of the time difference between client and server, while the ntpd command cannot synchronize when the time difference is too large.
There is another way on the Internet without modifying the reorganization strategy.
There is a Windows domain environment, add a task plan to each client, and execute the following command regularly
W32tm / config / syncfromflags:manual / manualpeerlist:time.stdtime.gov.tww32tm / config / update
Without a Windows domain environment, add a task plan to each client and execute the following command regularly
Of course, you can also change the registry to set time synchronization, as follows
Server configuration (Ntp server, the client will synchronize according to the time of this server)
1. Microsoft key + R key, enter "run", enter "regedit" and enter the registry.
2. HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ Parameters\ Type right-click to modify-> to NTP (default is NTP, which can be checked if it is already NTP)
3. Modify the Enabled value of HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ TimeProviders\ NtpServer to 1 (originally 0)
4. Modify the value of "AnnounceFlags" in HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ Config to 5 (originally a)
5. Restart the time service
Net stop w32time & & net start w32time
6. Press start-> run, enter "services.msc" to enter the service, and set the start mode of windows time service to Auto.
II. Client configuration
1. Find HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ Parameters\ NtpServer, change the value to the IP of the set NtpServer, and then add 0x1. For example, "172.31.4.51" 0x1. Notice that IP is followed by a comma and 0x1.
2. Modify "SpecialPollInterval" in HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ TimeProviders\ NtpClient
This represents the time interval, how often is synchronized with the Ntp server in seconds, and the original value is "93a80" (hexadecimal)
3. Modify the value of UpdateInterval in HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ TimeProviders\ Config. Here, I change it to 5, but I'm not sure if I want to set this. In the course of trying, I found that if this is not set, it seems to be out of sync. That's why I set it. There is no such step in the configuration mentioned by other people on the Internet. The original default value is 360000 (decimal).
4. Set HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ Config\ MaxNegPhaseCorrection to FFFFFFFF (originally d2f0, hexadecimal)
Set HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ W32Time\ Config\ MaxPosPhaseCorrection to FFFFFFFF (originally d2f0, hexadecimal)
MaxNegPhaseCorrection represents a slower time than the NTP server. If the local time exceeds the MaxNegPhaseCorrection seconds of the NTP server, it will not be synchronized.
MaxPosPhaseCorrection represents a faster time than the NTP server. If the local time exceeds the MaxNegPhaseCorrection seconds of the NTP server, it will not be synchronized.
5. Restart the w32time service
Net stop w32time & & net start w32time
6. Press start-> run, enter "services.msc" to enter the service, and set the start mode of windowns time service to Auto.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.