1th Chapter ntp1.1 NTP Introduction
NTP, Network Time Protocol, is a protocol that is used to synchronize the time of each computer in a 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.
1.2 NTP server-side deployment
1.2.1Environment Description Use System: CentOS7.4(CentOS6 with CentOS7 required) IP address: External network-10.0.0.62Intranet172.16.1.621.2.2Installing NTP yum-y install NTP1.2.3Modify configuration file Vim/etc/ntp.conf #添加 Restrict172.16.1.0Mask255.255.255.0nomodify notrap Server ntp1.aliyun.com1.2.4start Systemctl start ntpd #启动 systemctl status ntpd #查看状态 [email protected]~]# Ntpstat #查看是否正常 Synchronised (synchronized) to NTP server (5.79.108.34) at stratum3Time correct to within1230MS Polling server every -S
1.1 Client Use
1.3. 1 Test ntpdate 172.16. 1.62 -D 172.16. 1.621.3. 2 "*/5 * * * * */usr/sbin/ntpdate 172.16.1.62 &>/dev/null" >>/var/spool/cron/root
Build NTP time server NTP-(Network Protocol)