NTP服务器:将RaspberryPi3设置为NTP服务器(不使用外部NTP服务器)

关于NTP服务器的问题,在external ntp server中经常遇到, 我找遍了,但找不到答案。

我找遍了,但找不到答案。

我可以使用我的树莓派作为 NTP 服务器(独立)。

我想在 LAN 上同步 4 个设备以进行日志记录,它们将在没有 WAN 访问的 LAN 上...一个是 Cisco 交换机,一个是 Pi,另外两个是我要登录的东西的转换盒(它们将是 NTP 客户端)。

我找到的所有答案都是使用 GPS 模块设置 Pi(我不能在这里做)或将其同步到外部 NTP 服务器以级联时钟(我不能在这里做)...我可以使用 NTP 只是发送 Pi 的系统时间吗?

0

您可能需要编辑 NTP 服务器的代码,因为没有太多的理由这样做。

最好的主意是在 RPihttp://www.reeve.com/Documents/Articles%20Papers/Reeve_GpsNtp-Pi.pdf上使用 GPS 帽

0

来自未来的亲爱的人们:这是我们到目前为止所发现的……

在 Raspberry Pi 上,运行以下命令:

sudo apt update
sudo apt install ntp
sudo ufw allow ntp  # if your firewall is enabled
sudo ufw allow 123
sudo sed --in-place --expression "\$aserver 127.127.1.0" /etc/ntp.conf
sudo systemctl start ntpd

在 Cisco 交换机上,运行以下命令:

— 如果使用 Cisco IOS,请不要忘记使用clock read-calendar强制 NTP 同步。

configure terminal
ntp server <the IPv4 address of your Raspberry Pi>
end
clock read-calendar

PS-如果您想关闭所有设备...

在 Raspberry Pi 上,运行以下命令:

sudo ufw delete allow ntp
sudo ufw delete allow 123
sudo systemctl stop ntpd
sudo sed -i "/server 127.127.1.0/d" /etc/ntp.conf

在 Cisco 交换机上,运行以下命令:

configure terminal
no ntp server <the IPv4 address of your Raspberry Pi>
end

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(219)
Asp注入:经典ASPSQL注入保护
上一篇
97 soo:从naukri等工作门户获取数据..monster和 soo并在我的网站上显示
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(12条)