ARM-Linux使用ntpdate同步本机时间
来源:互联网 发布:seo分享ppt 编辑:程序博客网 时间:2024/06/06 19:56
1. 下载 ntp-4.2.8p8.tar.gz(注:ntpdate依赖openssl,需现编译openssl)
2. 解压
tar -zxf ntp-4.2.8p8.tar.gz
cd ntp-4.2.8p8
3. 在ntpd/ntp_loopfilter.c文件末尾增加"MOD_NANO"宏定义
#ifndef MOD_NANO
#define MOD_NANO 0x2000
#endif
4. 生成makefile文件
./configure --prefix=/usr/local/arm/ntp --host=arm-hisiv100nptl-linux CC=arm-hisiv100nptl-linux-gcc --with-yielding-select=yes --enable-openssl LIBS=-L/usr/local/arm/ssl/lib CPPFLAGS=-I/usr/local/arm/ssl/include --exec-prefix=/usr/local/arm/ntp
说明:prefix为安装目录,host为目标板交叉编译工具链, --enable-openssl:ntpdate依赖openssl,CPPFLAGS:openssl头文件,LIBS:openssl库
5. 编译并安装
make
sudo make install
6. 编译好的工具位于安装目录的bin文件夹中,拷贝需要的工具到arm板的/usr/sbin目录中
遇到问题汇总:
1. 执行ntpdate ntp_server_IP,报错:
no server suitable for synchronization found
原因:选择的ntp时间服务器不合适,被服务器拒绝
解决方案: 选择公开的ntp时间服务器,如us.ntp.org.cn
- ARM-Linux使用ntpdate同步本机时间
- Linux使用ntpdate时间同步
- Linux下使用ntpdate进行时间同步
- linux同步时间错误 使用 ntpdate命令
- Linux系统下使用ntpdate同步时间
- linux下使用ntpdate同步网络时间
- 使用ntpdate同步时间
- linux c 获得本机时间date
- arm-linux编译ntpdate方法
- arm-linux编译ntpdate方法
- ntpdate linux时间同步命令
- Linux下ntpdate时间同步
- linux 时间同步、ntpd、ntpdate
- linux ntp ntpdate 同步时间
- linux时间同步,ntpd、ntpdate
- linux时间同步,ntpd、ntpdate
- Linux下ntpdate时间同步
- linux ntpdate同步网络时间
- 超出文本省略在IE上无效果,js封装兼容
- Pclint集成VS2013及常见用法
- kali下的个工具介绍及简单使用(转)
- linux下如何产生core,调试core
- 三极管做开关,常用到的电容作用
- ARM-Linux使用ntpdate同步本机时间
- [ Java学习 ] 破除思维定势之 C++ 和 Java 的差异 002
- Jquery.media.js实现网页在线预览pdf文件
- React学习之路(一)
- 微博第三方登录
- java反序列化php序列化的对象
- Tslib-1.4的嵌入式移植
- Spring Boot学习
- 测试