ntp 服務(wù)器搭建
服務(wù)器公網(wǎng)
終于還是要搭建ntp服務(wù)器,我的架構(gòu)是一臺服務(wù)器可以上公網(wǎng),其他內(nèi)網(wǎng)服務(wù)器不能。
ntp服務(wù)器是C/S架構(gòu)的時間同步服務(wù)器。
方案:
公網(wǎng)服務(wù)器搭建ntp服務(wù)器端
其他服務(wù)器為客戶端
公網(wǎng)服務(wù)器:
root@localhost~#yuminstallntp
配置/etc/ntp.conf
root@localhost~#more/etc/ntp.conf|grep-v^$|grep-v^#
driftfile/var/lib/ntp/drift
restrictdefaultignorenomodifynotrapnopeernoquery#ignore表示拒絕所有主機
restrict-6defaultkodnomodifynotrapnopeernoquery
restrict127.0.0.1
restrict-6::1
#允許內(nèi)網(wǎng)其他機器同步時間
restrict192.168.1.0mask255.255.255.0nomodifynotrap
#中國這邊最活躍的時間服務(wù)器:
server210.72.145.44perfer#中國國家受時中心
server202.112.10.36#1.cn.pool.ntp.org
server59.124.196.83#0.asia.pool.ntp.org
#允許上層時間服務(wù)器主動修改本機時間
restrict210.72.145.44nomodifynotrapnoquery
restrict202.112.10.36nomodifynotrapnoquery
restrict59.124.196.83nomodifynotrapnoquery
#外部時間服務(wù)器不可用時,以本地時間作為時間服務(wù)
server127.127.1.0#localclock
fudge127.127.1.0stratum10
includefile/etc/ntp/crypto/pw
客戶機:
ntpdate-u192.168.1.1
計劃任務(wù):
013***ntpdate-u192.168.1.1
Tags:服務(wù)器公網(wǎng),ntp 服務(wù)器搭建
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。