<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                > 192.168.56.10 (作為內網時間同步服務器) > 192.168.56.11 ## 1. server端安裝ntp服務 192.168.56.10 ``` yum -y install ntp ``` ## 2. 修改server配置 ``` vi /etc/ntp.conf # For more information about this file, see the man pages # ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). driftfile /var/lib/ntp/drift # Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. restrict default nomodify notrap nopeer noquery # Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 restrict ::1 # Hosts on local network are less restricted. #restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap # 1. 網其他機器同步時間 restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap #Use public servers from the pool.ntp.org project. #Please consider joining the pool (http://www.pool.ntp.org/join.html). # 2. 中國這邊最活躍的時間服務器() server 210.72.145.44 perfer # 中國國家受時中心 server 202.112.10.36 # 1.cn.pool.ntp.org server 59.124.196.83 # 0.asia.pool.ntp.org # allow update time by the upper server # # 3. 允許上層時間服務器主動修改本機時間 restrict 210.72.145.44 nomodify notrap noquery restrict 202.112.10.36 nomodify notrap noquery restrict 59.124.196.83 nomodify notrap noquery # 4、外部時間服務器不可用時,以本地時間作為時間服務 server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 ``` **重啟ntp服務** ``` systemctl start ntpd ``` 此時,兩臺時間不一樣 ``` [root@localhost ~]# date Mon May 13 20:47:12 EDT 2019 [root@localhost ~]# date Mon May 13 08:45:44 EDT 2019 ``` ## 3. client同步server時間 讓client(192.168.56.11)去時間服務器上同步時間,ntpdate命令用于同步更新互聯網時間,或者NTP服務器時間 安裝ntpdate 命令 ``` yum install ntpdate -y ``` 與時間服務器同步時間 ``` ntpdate 192.168.56.10 ``` ## 4. 定時任務 ``` 30 5 * * * root /usr/sbin/ntpdate -u pool.ntp.org && /sbin/clock --systohc ``` 每天5點半同步時間,clock --systohc是硬盤時間同步系統時間的意思。 ## 5. client與server同步的另一種方式 這種方式麻煩 1、客戶端安裝ntp服務 2、配置客戶端去同步時間服務器的時間
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看