Driftfile option, a file is specified to hold the system clock frequency deviation, which is used by the NTPD program to automatically compensate for the natural drift of the clock so that the clock remains fairly accurate even when the external source is cut off
Broadcastdelay 0.008
Logfile/var/log/ntp.log
Keys/etc/ntp/keys
Client settings:
Set by crontab timer, run once every 5 minutes
*/5 * * * */usr/local/wapsh/ntprsync.sh
[Root@appserver
NTP server ConstructionNTP is a time server that provides the Synchronization Update time of other computers, so that the time of each computer is the same, without any deviation due to the long running of the system. The client a
11grac Configuring the NTP server TIP01 IP:162.20.1.228NBSP;NBSP;NTP service-side TIP02 ip:162.20.1.229 Before the NTP client configures the NTP server, verify that the server is instal
NTP Server: Network TimeprotocolBIOS the intrinsic characteristics of the internal chip can easily cause BIOS Time and UTC There are differences in global standard time. Time synchronization (Synchronize) is an effective way to avoid the
1, start--> run input gpedit.msc
2, Computer Configuration--> Management Template--> system-->windows Time service--> time provider--> Right click Configure window NTP client to select Properties. A, select Enabled B, and enter the time synchronization server's address in the NT
Build ntp service on centos Server1. Preparations before installation
View the time zone set above the system
[Root @ linux-node1 ~] # Cat/etc/sysconfig/clock ZONE = "Asia/Shanghai" Thought: how to modify the solution on a linux host: change the time zone vim/etc/sysconfig/clockZONE = "Asia/Shanghai" UTC = trueARC = false to overwrite the system
1.windows Server 2008 Standard servers do not have NTP.2. Some of the tutorials on the web are inaccurate and can be implemented below. The NTP server has been running for a long time and the problem does not occur.3. Information is collected online.The steps are as follows:
The installation of the NTP server on centos 5.6 requires time synchronization between some services and multiple machines in the experiment. Therefore, the prerequisites for building NTP are as follows: 1. install the ntp service yum install
Protocol Package:
The main fields are interpreted as follows:
L LI (Leap indicator): The length is 2 bits, the value is "11" when the alarm state, the clock is not synchronized. NTP itself does not process for other values.
L VN (version number): 3 bits in length, the version of NTP, the current version is 3.
L Mode: Length is 3 bits, indicating the mode of operation of
Modify/etc/ntp. conf file content: add a line: serverasia. pool. ntp. orgprefer comment out this line: server127.127.1.0 start the ntp service: servicentpdstart modify the/etc/sysconfig/ntpd file, and change SYNC_HWCLOCKno to SYNC_H... modify/etc/ntp. conf file content:
Add a row:
Tags: 1.0 technical Pictures Add Firewall boot start ODA watch tarPre-configuration: Turn off the firewall, configure the HOSTS,SSH password-free login1. Select the standard for synchronization, I am using hadoop002 (set to the current time) as the synchronization standard, hadoop003 (Time is March 2018 21, set with Date-s) and hadoop004 (March 2018 21) with which to keep in syncSee if
public static DateTime Getnetworktime (){Default Windows time ServerConst string ntpServer = "1.cn.pool.ntp.org";NTP message size-16 bytes of the digest (RFC 2030)var ntpdata = new byte[48];Setting the Leap Indicator, Version number and Mode valuesNtpdata[0] = 0x1B; LI = 0 (no warning), VN = 3 (IPv4 only), mode = 3 (Client mode)var addresses = Dns.gethostentry (ntpServer). AddressList;The UDP port number as
socket.Receive(ntpData);33 socket.Close();34 35 //Offset to get to the "Transmit Timestamp" field (time at which the reply 36 //departed the server for the client, in 64-bit timestamp format."37 const byte serverReplyTime = 40;38 39 //Get the seconds part40 ulong intPart = BitConverter.ToUInt32(ntpData, serverReplyTime);41
use the UTC clock configuration file/etc/localtime the time profile on the local side, the timezone specified in the clock will be/usr/share/zoneinfo/Copy the time profile in the/etc/localtimeCommon directives:/bin/date for the modification and display of Linux software time/sbin/hwclock is used to modify and display the BIOS
sudo nano/etc/ntp.confAnd then find
# pool.ntp.org maps to about low-stratum NTP servers. Your Server would# Pick a different set every time it starts up. Please consider joining the# Pool: Server 0.debain.pool.ntp.org IburstServer 1.debain.pool.ntp.org IburstServer 2.debain.pool.ntp.org IburstServer 3.debain.poo
A. Environment Preparationxuegod63.cn Service Sidexuegod64.cn Clienttwo. Server-side configuration:1. Installing the NTP service[[email protected] ~]# Yum install-y NTP2. turn on the NTPD service and set the boot up[[Email protected] ~]# service NTPD startStarting ntpd: [OK][Email protected] ~]# chkconfig ntpd on3. To see if the port is started[Email protected] ~]# netstat-anput| grep 123UDP 0 0
Experimental environment:
Linux CentOS 5.5 Two units
IP Address:
ntpserver:192.168.186.129
ntpclient:192.168.186.152
Test requirements:
Install the NTP server and deploy the implementation to allow the client to synchronize its practices normally. and analysis of the fault handling encountered during the implementation of the project.
Implementation process:
NtpServer-side deployments.
1, first che
Configure NTP Automatic Update timeInstalling the Ntpdate Program
shell># yum–y Install Ntpdate
Use Crontab to set the system to synchronize time with the NTP server 0:00 per dayshell># crontab–e
0 0 * * * ntpdate your_ntp_server_domain_name or YOUR_NTP_SERVER_IP_ADDR
--date= "06/18/14 14:55" (Month/day/year: minutes: seconds)The hardware clock is synchronized with the system clock:# Hwclock--hctosys or # clock--hctosys? HC represents the hardware time, SYS represents the system time, i.e. the system clock is synchronized with the hardware clocksystem clock and Hardware clock synchronization:# Hwclock--SYSTOHC or # clock--SYSTOHC? Synchronize the hardware clock with the
REDHAT7 Setting up NTP (Time synchronization)Installation:# yum Install NTPStart:# Systemctl Start ntpd# Systemctl Enable NTPDTo view synchronization:# ntpq-pOpen firewall:# Firewall-cmd--permanent--ADD-SERVICE=NTPNTP server is now completeClient synchronizes from NTP serverInstallation:# yum Install NTPTo modify the c
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.