CentOS7部署ntp服务器

主机 角色
192.168.48.128 Server
192.168.48.129 Client
192.168.48.130 Client

所有主机安装ntp服务

yum install -y ntp

Server配置

编辑Server的配置文件: /etc/ntp.conf

启动服务并加入开机启动

systemctl start ntpd
systemctl enable ntpd

查看状态

Client配置

client配置就简单很多,只要把时间服务器指向server(192.168.48.128)就可以了

# /etc/ntp.conf
...
server 192.168.48.128 iburst
...

启动

systemctl start ntpd
systemctl enable ntpd

查看状态

其他的Client也是同样的操作即可

原文地址:https://www.cnblogs.com/sellsa/p/11313315.html