1 [root@client ~]# yum -y install ntp #此方式也可只安装nptdate
2
3 [root@client ~]# ntpdate 172.24.8.30 #ntpdate命令同步即可
1 [root@client ~]# yum -y install ntp #此方式也可只安装nptdate
1 [root@client ~]# vi /etc/ntp.conf
2
3 restrict 172.24.8.30 nomodify notrap noquery
4
5 server 172.24.8.30 iburst
6
7 server 127.127.1.0
8
9 fudge 127.127.1.0 stratum 10
1 [root@client ~]# systemctl start ntpd.service
2
3 [root@client ~]# systemctl enable ntpd.service
1 [root@client ~]# ntpdate -u 172.24.8.30 #先手动同步测试一次
2
3 [root@client ~]# systemctl start ntpd.service
4
5 [root@client ~]# systemctl enable ntpd.service