首页 > 其他 > 详细

buildroot ntp 网络时钟同步

时间:2016-12-01 14:00:07      阅读:312      评论:0      收藏:0      [点我收藏+]
/**********************************************************************
 *                     buildroot ntp 网络时钟同步
 * 说明:
 *     文件系统需要网络时钟同步,于是使用ntp来做这件事情。
 *
 *                                  2016-12-1 深圳 南山平山村 曾剑锋
 *********************************************************************/

一、buildroot配置:
    1. 时区:
      ┌───────────────────────── System configuration ──────────────────────────┐
      │  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty │  
      │  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y>        │  
      │  selectes a feature, while <N> will exclude a feature.  Press           │  
      │  <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] feature │  
      │ ┌────^(-)─────────────────────────────────────────────────────────────┐ │  
      │ │    [*] Purge unwanted locales                                       │ │  
      │ │    (C en_US) Locales to keep                                        │ │  
      │ │    ()  Generate locale data                                         │ │  
      │ │    [*] Install timezone info                                        │ │  
      │ │    (default) timezone list                                          │ │  
      │ │    (Etc/UTC) default local time                                     │ │  
      │ │    ()  Path to the users tables                                     │ │  
      │ │    ()  Root filesystem overlay directories                          │ │  
      │ │    ()  Custom scripts to run before creating filesystem images      │ │  
      │ │    ()  Custom scripts to run inside the fakeroot environment        │ │  
      │ └────┴(+)─────────────────────────────────────────────────────────────┘ │  
      ├─────────────────────────────────────────────────────────────────────────┤  
      │        <Select>    < Exit >    < Help >    < Save >    < Load >         │  
      └─────────────────────────────────────────────────────────────────────────┘  
    2. ntpdate命令:
      ┌──────────────────────── Networking applications ────────────────────────┐
      │  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty │  
      │  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y>        │  
      │  selectes a feature, while <N> will exclude a feature.  Press           │  
      │  <Esc><Esc> to exit, <?> for Help, </> for Search.  Legend: [*] feature │  
      │ ┌────^(-)─────────────────────────────────────────────────────────────┐ │  
      │ │    [ ] noip                                                         │ │  
      │ │    [*] ntp                                                          │ │  
      │ │    [ ]   sntp                                                       │ │  
      │ │    [ ]   ntp-keygen                                                 │ │  
      │ │    [ ]   SHM clock support                                          │ │  
      │ │    [ ]   ntpd                                                       │ │  
      │ │    [*]   ntpdate                                                    │ │  
      │ │    [ ]   ntpdc                                                      │ │  
      │ │    [ ]   ntpq                                                       │ │  
      │ │    [ ]   ntpsnmpd                                                   │ │  
      │ └────┴(+)─────────────────────────────────────────────────────────────┘ │  
      ├─────────────────────────────────────────────────────────────────────────┤  
      │        <Select>    < Exit >    < Help >    < Save >    < Load >         │  
      └─────────────────────────────────────────────────────────────────────────┘  
    
二、执行命令
    [zengjf@root /etc]#  cp /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
    [zengjf@root /etc]#  cat timezone 
    Asia/Shanghai
    [zengjf@root /etc]#  ntpdate us.pool.ntp.org
     1 Dec 12:04:59 ntpdate[2437]: adjust time server 204.9.54.119 offset 0.009610 sec
    [zengjf@root /etc]#  

 

buildroot ntp 网络时钟同步

原文:http://www.cnblogs.com/zengjfgit/p/6121385.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!