NTP time synchronization

One, install ntp and ntpd

yum install -y ntp
yum install -y ntpd

[Note: you can’t download, you can search first]

Two, modify the configuration file

vi /etc/ntp.conf

Main node:
Insert picture description here
other nodes:
Insert picture description here
three, start

/bin/systemctl restart ntpd.service
service ntpd start
ntpstat     #查看是否同步,这个过程可能要等一段时间
date   #查看所有机器时间是否相同

Like this, it means successful synchronization
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43288259/article/details/115086507