linux set time synchronization ntp

NTP called the Network Time Protocol, namely the Network Time Protocol. It is a protocol used to synchronize the computer time. It enables a server computer to make the synchronization clock source or may be provided with high precision time correction (on the LAN with the standard time less than 1 ms, several tens of milliseconds on the WAN), but also to prevent malicious identifiable manner by the encryption protocol *** .

Experimental environment
two virtual machines NTP time server 192.168.43.57
host 192.168.43.29

Server

Install ntp

yum install -y ntp

Edit the configuration file vim /etc/ntp.conf

linux set time synchronization ntp

This line to comment
#restrict default nomodify notrap nopeer noquery

linux set time synchronization ntp

Open ntp service: systemctl start ntpd

Client

Install ntp service: yum -y install ntp

Modify the configuration file, add the upper time server

linux set time synchronization ntp

Open ntp service: service ntpd start

Synchronization time: ntpdate 192.168.43.57

Guess you like

Origin blog.51cto.com/14375809/2430587