zoukankan      html  css  js  c++  java
  • buildroot ntp 网络时钟同步

    /**********************************************************************
     *                     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]#  
  • 相关阅读:
    找出2n+1个数中不成对的那个(升级版)
    找出2n+1个数中不成对的那个
    随手记,完美的记账软件
    NOD32强制卸载工具使用方法【转】
    中医养生重在养“气”【灵枢针灸-袁医生】
    美国大学对本科生培养的12条标准【转】
    Windows软件使用Q&A集锦【持续更新】
    VLSI和ASIC的区别(转)
    Verilog 模块参数重定义(转)
    FPGA技术的一些基本概念(综合、BlackBox)(转)
  • 原文地址:https://www.cnblogs.com/zengjfgit/p/6121385.html
Copyright © 2011-2022 走看看