嵌入式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
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值