時間伺服器的IP為:192.168.10.1
1). # rpm -ivh ntp-4.1.2-4.EL3.1.i386.rpm
2). # vi /etc/ntp.conf
註釋一行
restrict default ignore
加入一行
restrict 192.168.10.0 mask 255.255.255.0 notrust nomodify notrap
3). # vi /etc/ntp/step-tickers
加入一行
pool.ntp.org
這樣每次ntpd啟動時,會自動連接該國際標準時間伺服器;
4). # service ntpd start
5). # netstat -an |grep 123
確保該埠以udp方式開放
時間客戶端配置(192.168.10.2)
a. # ntpdate 192.168.10.2 應該顯示同步成功
b. # crond -e 加入 0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1 表示每隔10分鐘同步一次時間。 |
(責任編輯:A6)
[火星人 ] 如何配置一台Linux操作系統的時間伺服器已經有284次圍觀