日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢(xún)
選擇下列產(chǎn)品馬上在線(xiàn)溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問(wèn)題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
CentOS6.9下NTP時(shí)間服務(wù)器搭建

1.1 NTP簡(jiǎn)介

站在用戶(hù)的角度思考問(wèn)題,與客戶(hù)深入溝通,找到魏都網(wǎng)站設(shè)計(jì)與魏都網(wǎng)站推廣的解決方案,憑借多年的經(jīng)驗(yàn),讓設(shè)計(jì)與互聯(lián)網(wǎng)技術(shù)結(jié)合,創(chuàng)造個(gè)性化、用戶(hù)體驗(yàn)好的作品,建站類(lèi)型包括:網(wǎng)站建設(shè)、做網(wǎng)站、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣、空間域名、虛擬主機(jī)、企業(yè)郵箱。業(yè)務(wù)覆蓋魏都地區(qū)。

NTP(Network Time Protocol,網(wǎng)絡(luò)時(shí)間協(xié)議)是用來(lái)使網(wǎng)絡(luò)中的各個(gè)計(jì)算機(jī)時(shí)間同步的一種協(xié)議。它的用途是把計(jì)算機(jī)的時(shí)鐘同步到世界協(xié)調(diào)時(shí)UTC,其精度在局域網(wǎng)內(nèi)可達(dá)0.1ms,在互聯(lián)網(wǎng)上絕大多數(shù)的地方其精度可以達(dá)到1-50ms。

NTP服務(wù)器就是利用NTP協(xié)議提供時(shí)間同步服務(wù)的。

系統(tǒng)版本

[root@test ~]# cat /etc/RedHat-release

centos release 6.9 (Final)

1.2 NTP服務(wù)器安裝

[root@test ~]# rpm -qa ntp

ntp-4.2.6p5-10.el6.centos.2.x86_64

如果沒(méi)有安裝就yum install ntp -y進(jìn)行安裝

1.3 配置NTP服務(wù)

備份配置文件

[root@test ~]# cp /etc/ntp.conf{,.bak}

[root@test ~]# ll /etc/ntp.conf*

-rw-r--r--. 1 root root 1778 Jan 11  2017 /etc/ntp.conf

-rw-r--r--  1 root root 1778 Oct 23 23:10 /etc/ntp.conf.bak

精簡(jiǎn)化配置文件

[root@test ~]# egrep -v "^$|#" /etc/ntp.conf.bak  >/etc/ntp.conf

修改配置文件

[root@test ~]# cat /etc/ntp.conf

#driftfile /var/lib/ntp/drift

#restrict default kod nomodify notrap nopeer noquery

#restrict -6 default kod nomodify notrap nopeer noquery

#restrict 127.0.0.1

#restrict -6 ::1

#server 0.centos.pool.ntp.org iburst

#server 1.centos.pool.ntp.org iburst

#server 2.centos.pool.ntp.org iburst

#server 3.centos.pool.ntp.org iburst

#includefile /etc/ntp/crypto/pw

#keys /etc/ntp/keys

# nomodify客戶(hù)端可以同步

# 將默認(rèn)時(shí)間同步源注釋改用可用源

restrict default nomodify

server ntp1.aliyun.com

server time.nist.gov

1.4 啟動(dòng)NTP服務(wù)器

注意:如果有同步時(shí)間的定時(shí)任務(wù)要將其注銷(xiāo),否則會(huì)沖突

[root@test ~]# /etc/init.d/ntpd start

Starting ntpd:                                            [  OK  ]

顯示節(jié)點(diǎn)列表

[root@test ~]# ntpq -p
    remote          refid      st t when poll reach  delay  offset  jitter
==============================================================================
 time5.aliyun.co 10.137.38.86    2 u  28  64    3    5.092  6241215 185.623

 132.163.96.4    .INIT.          16 u    -  64    0    0.000    0.000  0.000

1.5 客戶(hù)機(jī)時(shí)間同步

客戶(hù)機(jī)要等幾分鐘再與新啟動(dòng)的ntp服務(wù)器進(jìn)行時(shí)間同步,否則會(huì)提示

no server suitable for synchronization found錯(cuò)誤

[root@client ~]# ntpdate 10.0.0.250

24 Oct 16:46:58 ntpdate[26694]: adjust time server 10.0.0.250 offset 0.320652 sec

本博文中所使用的系統(tǒng)版本為: CentOS release 6.9 (Final) 內(nèi)核版本為: 2.6.32-696.10.1.el6.x86_64 望讀者注意!


新聞標(biāo)題:CentOS6.9下NTP時(shí)間服務(wù)器搭建
當(dāng)前地址:http://m.5511xx.com/article/djpodce.html