目标:
设置master为ntp服务器
master连接外网服务器进行时间同步
slave1和slave2与master进行时间同步
master IP地址192.168.18.130
slave1 IP地址192.168.18.131
slave2 IP地址192.168.18.132
一、安装ntp服务
三台机子都要安装ntp服务
查看是否安装
rpm -qa | grep ntp

没有安装ntp使用如下命令安装
yum –y install ntp
二、配置ntp服务
master修改/etc/ntp.conf文件
sudo