安装ntpsegmentfault
# yum install ntp
开启ntp服务code
# systemctl start ntpd
配置防火墙,容许其余主机能够链接到此主机上的ntp服务get
# firewall-cmd --add-service=ntp --permanent # firewall-cmd --reload
ntp的配置文件默认在/etc/ntp.confcmd
原文链接https://segmentfault.com/a/1190000005591893配置