A. Experimental environment
Server:
IP:192.168.43.156
Client:
IP:192.168.43.185
II. Turn off the firewall and SElinux
systemctl stop firewalld.service
setenforce 0
Three configure the server:
3.1 install ntp service
yum install ntp ntpdate -y
3.2 modify the configuration file ntp.conf
vim /etc/ntp.conf
3.3 NTP server
service ntpd start
In order to make the service to automatically start at system boot time
service ntpd startchkconfig ntpd on
3.4 check whether the correct time server synchronization
ntpq -p
Four client configuration:
4.1 install ntp service
yum install ntp ntpdate -y
4.2 configuration file ntp.conf
vim /etc/ntp.conf
4.3 manual synchronization time
ntpdate 192.168.43.156