前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ubuntu 下ntp sever 安装及配置

ubuntu 下ntp sever 安装及配置

作者头像
瑶瑶
发布2020-06-03 15:44:58
1.8K0
发布2020-06-03 15:44:58
举报
  1. 安装 sudo apt-get install ntp
  2. 配置成和本机同步时间
代码语言:javascript
复制
# /etc/ntp.conf
driftfile /var/lib/ntp/ntp.drift 
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
#ntp server update with it self
server 127.127.1.0
fudge 127.127.1.0 stratum 5
#do not alow remote ipv4 and ipv6
restrict -4 default kod notrap nomodify nopeer noquery 
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
  1. 重启 service ntp restart
  2. 查看ntp服务器与上层ntp的状态 ntpq -p
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档