设置3台机器
选择一台机器作为同步服务A,A与外网同步,B,C 同步A
配置A:sudo vi /etc/ntp.conf
删除默认配置:
#restrict default kod nomodify notrap nopeer noquery
#restrict -6 default kod nomodify notrap nopeer noquery
#restrict 127.0.0.1
#restrict -6 ::1
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org
添加配置
允许那些机器与我同步