1 ubuntu 部署时间同步服务器
1.1 ntp server 安装
sudo apt update
sudo apt -y install npt
1.2 /etc/ntp.conf 配置
cp /etc/ntp.conf{
,.bak}
cat > /etc/ntp.conf << EOF
driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
restrict 127.0.0.1
restrict ::1
restrict source notrap nomodify noquery
server 0