Ubuntu系统下ntp服务器搭建
之前文章一直提及的“设备”,其它可以把它理解为一台X86架构的安装了ubuntu系统的服务器,其实这系统已经安装了ssh、telnet、apache等服务器了。本文讲讲搭建一个ntp服务器。
对于ntp,我们的设备需要提供同步的函数接口,以便调用者可以随时随意地同步时间。我的工作更是安装ntp工具以及教人如何调用这个工具。
下面的操作基于ubuntu14.04版本。
安装步骤
fudge 127.127.1.0 stratum 8
sudo /etc/init.d/ntp restart
问题解决
14 Aug 10:26:30 ntpdate[1448]: ntpdate 4.2.0@1.1161-r Tue Jan 21 15:25:43 CST 2014 (3)
Looking for host 172.18.100.168 and service ntp
host found : 172.18.100.168
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
172.18.100.168: Server dropped: strata too high
server 172.18.100.168, port 123
stratum 16, precision -21, leap 11, trust 000
refid [172.18.100.168], delay 0.02574, dispersion 0.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 14:28:16.000
originate timestamp: d7f42487.0fcf554a Fri, Oct 24 2014 9:06:15.061
transmit timestamp: d977d056.849ff92f Fri, Aug 14 2015 10:26:30.518
filter delay: 0.02591 0.02574 0.02580 0.02577
0.00000 0.00000 0.00000 0.00000
filter offset: -2540641 -2540641 -2540641 -2540641
0.000000 0.000000 0.000000 0.000000
delay 0.02574, dispersion 0.00000
offset -25406415.456428
14 Aug 10:26:30 ntpdate[1448]: no server suitable for synchronization found
fudge 127.127.1.0 stratum 8
10 Nov 10:07:57 ntpdate[5892]: ntpdate 4.2.6p5@1.2349-o Wed Oct 9 18:57:00 UTC 2013 (1)
Looking for host 172.18.100.168 and service ntp
host found : 172.18.100.168
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
transmit(172.18.100.168)
receive(172.18.100.168)
172.18.100.168: Server dropped: server is very broken
server 172.18.100.168, port 123
stratum 9, precision -21, leap 00, trust 000
refid [172.18.100.168], delay 0.02631, dispersion 0.00000
transmitted 4, in filter 4
reference time: d80a9c4a.02281b8f Mon, Nov 10 2014 10:07:06.008
originate timestamp: d8096562.75139fc6 Sun, Nov 9 2014 12:00:34.457
transmit timestamp: d80a9c83.eee02d38 Mon, Nov 10 2014 10:08:03.933
filter delay: 0.02631 0.02634 0.02664 0.02635
0.00000 0.00000 0.00000 0.00000
filter offset: -79649.4 -79649.4 -79649.4 -79649.4
0.000000 0.000000 0.000000 0.000000
delay 0.02631, dispersion 0.00000
offset -79649.476483
10 Nov 10:08:03 ntpdate[5892]: no server suitable for synchronization found
Thu Jan 9 11:00:00 GMT-8 2014
# ntpdate -u 172.18.100.168
Looking for host 172.18.100.168 and service ntp
host found : 172.18.100.168
9 Nov 12:01:49 ntpdate[626]: step time server 172.18.100.168 offset 26269305.872492 sec
# date
Sun Nov 9 12:01:50 GMT-8 2014
Sun Nov 9 12:00:00 CST 2014
root@localhost:~# ntpdate -u 202.120.2.101
9 Nov 12:02:28 ntpdate[2607]: no server suitable for synchronization found
root@localhost:~# ntpdate -u 202.120.2.101
9 Nov 12:02:39 ntpdate[2608]: no server suitable for synchronization found
root@localhost:~#
root@localhost:~#
root@localhost:~# ntpdate -u 133.100.11.8
10 Nov 10:29:22 ntpdate[2628]: step time server 133.100.11.8 offset 80736.496480 sec
root@localhost:~# date
Mon Nov 10 10:29:24 CST 2014
李迟,完成于2014年年底,完稿于2015年年初,发表于已未年正月初五晚上
Ubuntu系统下ntp服务器搭建相关推荐
- Ubuntu系统下ntp服务器搭建2
上一篇文章主要讲NTP服务器的,在使用过,还遇到其它和时间有关的问题,本篇文章写写在同步时间和改时区方面的笔记. 时区修改 错误的时区: latelee@ubuntu:~/kernel$ date T ...
- ubuntu系统中samba服务器搭建
当我们需要windows和linux更好的进行文件交互时,使用Samba服务是一个不错的选择,本文介绍如何在linux中搭建Samba服务和怎样在windows下访问linux共享文件. 1.安装和卸 ...
- linux 下ntp服务器,Linux下NTP服务器搭建(示例代码)
一.搭建准备 1.确定自己的时区 #date命令可以查看当前系统时间,中国的时区为CST.使用tzselect命令进行配置时区 配置文件的修改:/etc/sysconfig/clock 2.检查NTP ...
- linux下ntp服务器搭建方法
环境 软件:fedora14,装在virtualbox虚拟机上 硬件:x86 具体步骤 检查是否安装了ntp 运行如下命令: rpm -qa | grep ntp 如果有如下输出,表示有安装ntp 服 ...
- linux系统下SVN服务器搭建
linux新手,整了好几天才搞好,做下笔记以备后续使用: 1.下载svn服务器 yum -y install subversion 2.创建仓库 svnadmin create /opt/svn/pr ...
- linux系统下ntp网络时钟服务器(NTP服务器)的搭建和使用
linux系统下ntp网络时钟服务器(NTP服务器)的搭建和使用 linux系统下ntp网络时钟服务器(NTP服务器)的搭建和使用 安徽京准科技开发的NTP网络时间源设备 参考 ahjzsz.com ...
- [Ubuntu]在Ubuntu系统下连接远程Ubuntu服务器并传输文件:安装putty, filezilla
转载自:[Ubuntu]在Ubuntu系统下连接远程Ubuntu服务器并传输文件_北望花村-CSDN博客_ubuntu上传文件到服务器 本篇文章介绍,如何在Ubuntu系统下连接远程Ubuntu系统并 ...
- Linux系统下SVN服务器的搭建过程详解 UpJ}s7+
Linux系统下SVN服务器的搭建过程详解 UpJ}s7+ 1 环境: 服务器放在redhatAS4.0上,客户端在windows 2000. k_lb"5z Z]jSq@%1H* ...
- ④ESP8266 开发学习笔记_By_GYC 【Ubuntu系统下ESP8266 开发环境搭建】
目录 ④ESP8266 开发学习笔记_By_GYC [Ubuntu系统下ESP8266 开发环境搭建] 一.安装前准备 1.乐鑫官方的ESP-IDF 编程指南 2.ESP-IDF风格的ESP8266 ...
最新文章
- sprintf 和strcpy 的差别
- Kubernetes 1.3版本之简单安装
- 何恺明最新一作论文:无监督胜有监督,迁移学习无压力,刷新7项检测分割任务...
- Practical Lessons from Predicting Clicks on Ads at Facebook (2014)论文阅读
- 009 自动打怪功能的设计和实现
- 观念什么意思_观念真不是凭空出现的,也不是单一的,观念来自环境并且不止一种...
- 关于GC.Collect在不同机器上表现不一致问题
- 关闭或开启memory_target
- Java生成pgp密钥对_在Javascript中生成PGP密钥对,并使用加密的PGP私钥对文本进行签名...
- 微软相关的开发资源列表(update)
- BigTable的开源实现:HBase数据库
- python中说_name_没有被定义_python – 为什么我得到这个NameError:名称’url_for’没有定义?...
- InvalidateRect的困惑
- 我为什么要使用Webpack?
- NYOJ 570欧拉函数求和(欧拉函数数论入门)
- mongodb 查多个不等于_MongoDB增删查
- python深度学习介绍
- 使用Jacob自动替换书签内容
- 2017 AMC8中文
- 解决VSTO EXCEL 设置合并单元格锁定时报错问题
热门文章
- 苹果向小型企业推出新付费订阅产品“Business Essentials”
- iPhone 14 Pro系列传出好消息,有望实现8GB内存自由
- 蔡崇信将担任阿里巴巴集团第一组董事
- 曝苹果iPhone 13将于8月开始大批量产,恶劣天气不会造成影响
- 贾跃亭的乐视股票要被拍卖了,每股2.51元起拍
- 用户一片哀嚎!三星手机系统突遇大面积崩溃:现黑屏、重启、乱码
- 小米集团公布2019年财报:全年总收入突破2000亿!
- Redmi K30 Pro屏幕参数公布:没有90Hz刷新率又如何?
- 董明珠回应口罩预约不到:没想到几十万人预约 正提高产能
- 携程内部信:公司高管自愿降薪 梁建章和孙洁将0薪