如何同步两个或多个分布式无线节点的时间?

如何同步两个或多个分布式无线节点的时间?

什么是同步两个或多个分布式无线节点的时间(时钟)的最佳方法,以使它们彼此一致并且不会出现周期滑动?

答案1

通常,我们会使用诸如ntpntpdate或 之类的东西chrony

apt-get install ntp
[or yum -y install ntp]

cat <<EOF >/etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift
server pool.ntp.org
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 127.0.0.1
restrict ::1
EOF
systemctl start ntp
systemctl enable ntp

相关内容