建立、配置时间服务器

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

在网络里面统一时间是一件很重要的事情,如果网络内的主机时间各自为政,

版本控制等其他一些对时间要求很苛刻的网络应用里面是非常重要的。

现在我想把自己建立时间服务器的过程跟步骤写出来,跟大家共享。

先下在源代码http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.1.1a.tar.gz,然后编译、安装;

编译、安装完成后,需要配置,

具体的配置:

1.设定时间服务器:

#touch /etc/ntp.conf 生成配置文件ntp.conf

===================== ntp.conf ===============

server 127.127.1.0

fudge 127.127.1.0 stratum 10

driftfile /etc/ntp.drift

broadcast 10.10.10.255

#touch /etc/ntp.drift 生成ntp.drift文件

#ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid 启动时间daemon

2.客户端的配置

#touch /etc/ntp.conf

================ /etc/ntp.conf ==============>

server the_time_server

driftfile /etc/ntp.drift

#touch /etc/ntp.drift

#ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid start the Network Time Protocol daemon

3.将该机器即作为Internet标准时间服务器的客户端,以便得到准确的时间

又将该机器作为局域网内的标准时间源、时间服务器,向网络提供标准时间

#touch /etc/ntp.conf

================== /etc/ntp.conf ==============>

server time.nist.gov

server ntp.ise.canberra.edu.au

server 127.127.1.0

fudge 127.127.1.0 stratum 10

driftfile /etc/ntp.drift

broadcast 10.10.10.255

#touch /etc/ntp.drift

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