在RedHatAS3上配置ntp时间服务器和客户端

王朝other·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

时间服务器配置(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)

1. # ntpdate 192.168.10.2

应该显示同步成功

2. # crond -e

加入

0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.1

表示每隔10分钟同步一次时间

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航