配置時間服務(wù)器
配置時間
在CentOS6.5上面安裝配置NTPSERVER
使用yum源安裝NTP:
yum-yinstallntp
配置時間源
vi/etc/ntp.conf
server210.72.145.44
serverntp.api.bz
server2.centos.pool.ntp.org
配置對客戶端(172.16.0.0/24的網(wǎng)段機器)提供NTP服務(wù)
#vi/etc/ntp.conf
restrict172.16.0.0mask255.255.255.0nomodifynotrap
配置NTPServer的層數(shù)提供本地服務(wù)
server127.127.1.0#localclock
fudge127.127.1.0stratum2
設(shè)置開機時自動運行時間服務(wù)
chkconfigntpdon
啟動或停止時間服務(wù)
#servicentpdstart
#servicentpdstop
#servicentpdrestart
驗證ntp服務(wù)已經(jīng)運行
pgrepntpd
更新本服務(wù)器的時間
ntpdate-u210.72.145.44
關(guān)閉iptables和selinux
#serviceiptablesstop
#setenforce0
配置iptable規(guī)則允許客戶端訪問本機NTPSever
vi/etc/sysconfig/iptables
增加一行(NTPServer使用UDP123端口)
-AINPUT-mstate--stateNEW-mudp-pudp--dport123-jACCEPT
重啟iptables
serviceiptablesrestart
Tags:配置時間,配置時間服務(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處理。