First, the standard time
GMT Greenwich Mean Time (generally refers to the world)
When UTC Coordinated Universal Time (Coordinated Universal Time is based on atomic -second basis, as close as possible in time when the world in a time metering system .UTC doubt the accuracy of the US NIST F-1 in 2000 before the atomic clock generating one second error.)
Two, NTP clock synchronization service
Because time is erroneous, although some work is no need for that it is precisely the time to complete, but some work must be precise so that time can accomplish a task. Therefore sync with the demands of time. Currently in use is the Network Time Protocol protocol ( Network Time Protocol).
(A) NTP works
(1) The client NTP server to the random port (UDP: 123) sending time synchronization request
(2) NTP server receives a request issued will adjust the time
(. 3) NTP client receives after NTP message server to adjust time synchronization to complete
(Ii) time synchronization server mode: one-time synchronization (manual synchronization), by the automatic synchronization service.
1. one-time synchronization time: ntpdate time server's domain name or ip address
Ip address check who has access: HTTP: //www.ntp.org.cn/pool.php
ntpdate 120.25.108.11 (select Ali cloud)
2.NTP server implementation
(1) NTP server installation
yum install ntp -y
(2) Check the NTP configuration file exists
ls -l /etc/ntp.conf
(3) NTP procedure involved
the ntpd
the ntpdate
tzdata -update
(. 4) related to the time program
DATE
hwclock
(5) NTP involved file
(. 6) NTP service
NTP service is a C / S architecture model, the upper layer is preferably a time when creating the local service server to provide synchronization services to synchronize the local time
ntp.conf description
restrict access control to manage the NTP
usage: restrict [ip] mask [netmask ] parameter
NTP server for synchronizing an upper end disposed
Usage: server [ip or hostname] [ prefer]
Let the local ntpd and local hardware time synchronization
vi /etc/ntp.conf:
Server 127.127.1.0 # local Clock
Fudge 127.127.1.0 a Stratum 10
Start ntpd systemctl (7) Linux client synchronization
1) 手动同步
ntpdate 192.168.1.100
2) 配置文件
vim /etc/ntp.conf
server 192.168.1.100
systemctl start ntpd
(8)查看上层 NTP 服务状态
ntpq –p