如何配置一臺(tái)Linux系統(tǒng)時(shí)間服務(wù)器
時(shí)間服務(wù)器的IP為:192.168.10.1
1)。#rpm-ivhntp-4.1.2-4.EL3.1.i386.rpm
2)。#vi/etc/ntp.conf
注釋一行
restrictdefaultignore
加入一行
restrict192.168.10.0mask255.255.255.0notrustnomodifynotrap
3)。#vi/etc/ntp/step-tickers
加入一行
pool.ntp.org
這樣每次ntpd啟動(dòng)時(shí),會(huì)自動(dòng)連接該國(guó)際標(biāo)準(zhǔn)時(shí)間服務(wù)器;
4)。#servicentpdstart
5)。#netstat-an|grep123
確保該端口以udp方式開(kāi)放
時(shí)間客戶端配置(192.168.10.2)
a.#ntpdate192.168.10.2
應(yīng)該顯示同步成功
b.#crond-e
加入
0-59/10****/usr/sbin/ntpdate192.168.10.1
表示每隔10分鐘同步一次時(shí)間。