NTP achieve time synchronization service

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

NTP achieve time synchronization service

Three configure the server:

3.1 install ntp service

yum install ntp ntpdate -y

NTP achieve time synchronization service

3.2 modify the configuration file ntp.conf

vim /etc/ntp.conf

NTP achieve time synchronization service

3.3 NTP server

service ntpd start

NTP achieve time synchronization service
In order to make the service to automatically start at system boot time

service ntpd startchkconfig ntpd on

NTP achieve time synchronization service

3.4 check whether the correct time server synchronization

ntpq -p

NTP achieve time synchronization service

Four client configuration:

4.1 install ntp service

yum install ntp ntpdate -y

NTP achieve time synchronization service
4.2 configuration file ntp.conf

vim /etc/ntp.conf

NTP achieve time synchronization service
4.3 manual synchronization time

ntpdate 192.168.43.156

NTP achieve time synchronization service

Guess you like

Origin blog.51cto.com/14375810/2427509