配置時(shí)間服務(wù)器
配置時(shí)間
在CentOS6.5上面安裝配置NTPSERVER
使用yum源安裝NTP:
yum-yinstallntp
配置時(shí)間源
vi/etc/ntp.conf
server210.72.145.44
serverntp.api.bz
server2.centos.pool.ntp.org
配置對(duì)客戶端(172.16.0.0/24的網(wǎng)段機(jī)器)提供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è)置開(kāi)機(jī)時(shí)自動(dòng)運(yùn)行時(shí)間服務(wù)
chkconfigntpdon
啟動(dòng)或停止時(shí)間服務(wù)
#servicentpdstart
#servicentpdstop
#servicentpdrestart
驗(yàn)證ntp服務(wù)已經(jīng)運(yùn)行
pgrepntpd
更新本服務(wù)器的時(shí)間
ntpdate-u210.72.145.44
關(guān)閉iptables和selinux
#serviceiptablesstop
#setenforce0
配置iptable規(guī)則允許客戶端訪問(wèn)本機(jī)NTPSever
vi/etc/sysconfig/iptables
增加一行(NTPServer使用UDP123端口)
-AINPUT-mstate--stateNEW-mudp-pudp--dport123-jACCEPT
重啟iptables
serviceiptablesrestart
Tags:配置時(shí)間,配置時(shí)間服務(wù)器
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信