centos7搭建ntp时间同步服务器

安装ntp

yum -y install ntp ntpdate

修改ntp配置文件

cat /etc/ntp.conf
restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap
server ntp.aliyun.com

启动ntp服务

systemctl enable ntpd
systemctl start ntpd

客户端测试同步时间

错误1: ntpdate[76283]: no server suitable for synchronization found

使用ntpdate -d 192.168.100.14 提示:

192.168.100.14: Server dropped: strata too high

在ntpd服务配置文件添加以下参数并重启ntpd服务进行时间同步测试

server 127.127.1.0 fudge
127.127.1.0 stratum 8
文章作者: 慕容峻才
文章链接: https://www.acaiblog.top/centos7搭建ntp时间同步服务器/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 阿才的博客
微信打赏
支付宝打赏