如何在ubuntu server 搭建ntp服务器

 我来答
max的深林
推荐于2016-08-20 · TA获得超过2059个赞
知道大有可为答主
回答量:5925
采纳率:100%
帮助的人:4944万
展开全部
1、安装ntp软件
sudo apt-get install ntp
2、修改配置文件
sudo vim /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
server ntp.ubuntu.com
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 192.168.10.0 mask 255.255.255.0 nomodify
restrict 127.0.0.1
restrict ::1
主要是在配置文件中的:
restrict -6 default kod notrap nomodify nopeer noquery
语句后面加入:
restrict 192.168.10.0 mask 255.255.255.0 nomodify
restrict 192.168.10.0 mask 255.255.255.0 nomodify---主要是允许能同步的服务器所在的内部网段
快又稳
2024-10-23 广告
广州快又稳网络科技有限公司是一家集技术研发、产品创新、服务优化于一体的高新技术企业。公司自成立以来,始终秉承“网络使人类缩进距离,我们让网络快又稳”的核心理念,致力于为全球客户提供高效、安全、易用的互联网解决方案及信息技术服务。在数字时代,... 点击进入详情页
本回答由快又稳提供
shoaling
2018-05-07 · TA获得超过4194个赞
知道大有可为答主
回答量:3206
采纳率:92%
帮助的人:624万
展开全部

网页链接

-供参考

1、安装ntp软件
sudo apt-get install ntp
2、修改配置文件
sudo vim /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
server ntp.ubuntu.com
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
restrict 192.168.10.0 mask 255.255.255.0 nomodify
restrict 127.0.0.1
restrict ::1
主要是在配置文件中的:
restrict -6 default kod notrap nomodify nopeer noquery
语句后面加入:
restrict 192.168.10.0 mask 255.255.255.0 nomodify
restrict 192.168.10.0 mask 255.255.255.0 nomodify---主要是允许能同步的服务器所在的内部网段

梁兆铃

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式