嵌入式ntp服务器的移植
一.交叉编译
1.官网下载http://www.ntp.org/点击download选项页
我的版本是ntp-4.2.6p5.tar.gz
2.解压
tar -zxvf ntp-4.2.6p5.tar.gz
3.进入解压目录配置
./configure --host=arm-linux CC=arm-none-linux-gnueabi-gcc
或者指定安装路径
./configure --host=arm-linux CC=arm-none-linux-gnueabi-gcc --prefix=/home/m/3rd/tmp
4.make和[make install]
5.生成
/bin(ntpd,ntpdate,ntpdc,ntp-keygen,ntpd,ntptime,sntp,tickadj...)
/lib
/sbin
/share (man)
目录拷贝到目标文件系统
二.配置测试ntp服务器
拷贝host系统/etc目录下的ntp.conf文件到目标系统/etc下,没有的话就先安装ntp服务就会有了(ubuntu 下sudo apt-get install ntp)
或者拷贝我的文件内容
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help driftfile /var/lib/ntp/ntp.drift # Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/ 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 # You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers. # By default, exchange time with everybody, but don't allow configuration.
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 # Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust # If you want to provide time to your local subnet, change the next line.
# (Again, the address is an example only.)
#broadcast 192.168.123.255 # If you want to listen to time broadcasts on your local subnet, de-comment the
# next lines. Please do this only if you trust everybody on the network!
#disable auth
#broadcastclient
测试
date 命令查看时间日期,
date 11111111修改时间
Mon Nov 11 11:11:00 UTC 2013
运行ntpdate 64.4.10.33更新时间 ip是ntp服务器的地址
11 Sep 05:13:21 ntpdate[1851]: adjust time server 64.4.10.33 offset -0.037363 sec
再次运行date
Wed Sep 11 04:49:01 UTC 2013
ntp时间服务器可以查看windows的时间设置
ping 一下ping time.windows.com
正在 Ping time.microsoft.akadns.net [64.4.10.33] 具有 32 字节的数据:
试了一下 直接ntpdate time.windows.com也行的
(外网要能连通 设置DNS
vi /etc/resolv.conf添加
nameserver 【dns地址】
)
嵌入式ntp服务器的移植的更多相关文章
- 三种嵌入式web服务器(Boa / lighttpd / shttpd)的 linux移植笔记
一:移植Boa(web服务器)到嵌入式Linux系统 一.Boa程序的移植 1.下载Boa源码 下载地址: http://www.boa.org/ 目前最新发行版本: 0.94.13 ...
- 嵌入式boa服务器移植
开发板:EDUKIT-III实验箱,S3C2410+LINUX2.4,实验箱随箱光盘提供的Zimage,nor flash启动. 主机:ubnutn10.4LTS,arm-linux-gcc 2.95 ...
- 嵌入式web服务器BOA的移植及应用
嵌入式web服务器子系统 一.嵌入式web服务器的控制流程 如下图所示,嵌入式web服务器可实现通过网络远程控制嵌入式开发板,便捷实用. 控制流程:浏览器 --->>>嵌入式开发板 ...
- 嵌入式开发之web服务器---boa移植
近段时间在做ti8148的编解码器又涉及到boa web服务器的移植.在移植到ARM开发板的过程中,遇到很多的问题.原先的自带thttpd 由于功能没有boa完善,比如在ubuntu下面的utf-8编 ...
- 移动物体监控系统-sprint4嵌入式web服务器开发
一.BOA嵌入式服务器的移植 step1:下载BOA服务器并解压,进入boa下面的src目录,执行./configure生成必须的配置文件以及Makefile step2:修改Makefile文件 c ...
- 嵌入式Boa服务器上CGI开发-(转自Bryce.Xiao)
嵌入式WEB服务器常见的有lighttpd shttpd thttpdboa mathopd minihttpdappwebgoahead=============================== ...
- Windows Server 2008 R2 NTP服务器
Server 1.查看服务器信息 w32tm /query /status 2.设置同步地址 w32tm /config /manualpeerlist:time.windows.com /syncf ...
- 学号20145332 《信息安全系统设计基础》实验五 简单嵌入式WEB服务器实验
实验目的 掌握在 ARM 开发板实现一个简单 WEB 服务器的过程. 学习在 ARM 开发板上的 SOCKET 网络编程. 学习 Linux 下的 signal()函数的使用. 实验内容 学习使用 s ...
- 20145216 20145330 《信息安全系统设计基础》 实验五 简单嵌入式WEB 服务器实验
20145216 20145330 <信息安全系统设计基础> 实验五 简单嵌入式WEB 服务器实验 实验报告封面 实验步骤 1.阅读理解源码 进入/arm2410cl/exp/basic/ ...
随机推荐
- ubuntu安装greenplum依赖包
ubuntu安装greenplum的过程中有两个比较难找的包,特地写出来给大家分享一下: 错误提示1:configure: error: header file <ldap.h> is r ...
- PHP使用纯真IP数据库
#纯真数据库调用函数(需要下载纯真数据库文件) function convertip($ip) { $ip1num = 0; $ip2num = 0; $ipAddr1 =""; ...
- CSS 规避脱标之两种用法
大家好,我是小强老师,今天讲解一小点知识哈 对比了才知道什么好 看不出,很漂亮吧! 有木有倾国倾城的美色. 呵呵,好多东西也是这样的,好的东西只有对比了才觉得好. 我们知道我们网页布局 有三模式. ...
- ajax请求响应中用window.open打开新窗口会被浏览器拦截的解决方式
一.问题描述 ajax 异步请求成功后需要新开窗口打开 url,使用的是 window.open() 方法,但是会被浏览器给拦截了,需要用户点下. 二.问题分析 浏览器之所以拦截新开窗口是因为该操作并 ...
- 关于Cocos2d-x 3.0正式版 粒子问题在IOS上正常显示,在Android下有问题的解决方式
前几个在Cocos2d-x论坛上,有人提到粒子系统的问题..这里列举一下解决的方法: 或许到时候大家用粒子效果的时候也会发现这个问题,如今把这个问题的解决办法说出来.至于原因我也不知道是引擎的问题还是 ...
- AdbWinApi编译详解(本人亲历)
1. 从微软官方下载WDDK,比如:GRMWDK_EN_7600_1.ISO(http://download.microsoft.com/download/4/A/2/4A25C7D5-EFBE-41 ...
- 我的Python成长之路---第二天---Python基础(8)---2016年1月9日(晴)
数据类型之字典 一.字典简介 字典dict(dictionary),在其他语言中也成为map,使用键-值(key-value)的形式存储和展现,具有极快的查找速度. 字典的定义 d = {'key': ...
- 【C++】第二章:Hello World!
1.开发工具:Microsoft Visual C++ v6.0 2.通过IDE建立Hello World程序: 我们可以看到三个文件夹结构,分别是: Source Files(源文件). Heade ...
- 基于visual Studio2013解决算法导论之005原地随机排列数组
题目 原地随机排列数组 解决代码及点评 #include <stdio.h> #include <stdlib.h> #include <malloc.h> ...
- boost::share_ptr用法
boost中提供了几种智能指针方法:scoped_ptr shared_ptr intrusive_ptr weak_ptr,而标准库中提供的智能指针为auto_ptr. 这其中,我最喜欢,使用最多的 ...