Ntp service set up
to prepare the environment:
server 192.168.124.117
Client 192.168.124.109
server configuration:
yum install ntp ntpdate -y
backup configuration file
cp /etc/ntp.conf /etc/ntp.conf.bak
edit the configuration file
vim / etc /ntp.conf
在里面
将#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap前面的注释去掉
再在下面添加一行 server 192.168.124.117(服务端Ip)
Start Service
service ntpd start
Turn off the firewall
systemctl STOP firewalld
setenforce 0
Client Configuration
Download
yum install ntp ntpdate -y
2. Edit the file
vim /etc/ntp.conf
Add the inside
server 192.168.124.109 (Client Ip)
Turn off the firewall
systemctl STOP firewalld
setenforce 0
Synchronize
ntpdate 192.168.124.117 (server ip)