RHEL5 中TFTP服务器的安装

来源:互联网 发布:windows 更新下载目录 编辑:程序博客网 时间:2024/05/22 22:10

         TFTP 是用来下载远程文件的最简单网络协议,基于UDP 协议而实现。嵌入式linux 的tftp 开发环境包括两个方面:Linux 服务器端的tftp-server 支持,嵌入式目标系统的tftp-client 支持。TFTP 服务器可以架设在Linux 主机或者Windows 主机上。 此处主要介绍linux下的安装。

1.检查Linux 服务器是否已经安装TFTP 服务器,在控制台执行以下命令检查:

[root@localhost Server]# rpm –q tftp-server 


2.若提示没有安装,在Redhat Enterprise Linux 5的安装光盘中有RPM安装包。在windows中用虚拟光驱打开ISO镜像文件后,可以在Server目录中找到相应的安装包。

xinetd-2.3.14-10.el5.i386.rpm  

tftp-0.42-3.1.i386.rpm  tftp-server-0.42-3.1.i386.rpm

提示:安装tftp之前需要先安装xinetd这个包,否则会报错,如下所示:

[root@localhost Server]# rpm -ivh  tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        xinetd is needed by tftp-server-0.42-3.1.i386

 

3.将两个安装包复制到linux服务器中某一个目录中,进入该目录,执行以下安装命令:

[root@localhost Server]# rpm -ivh  xinetd-2.3.14-10.el5.i386.rpm
warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:xinetd                 ########################################### [100%]

 再执行安装TFTP命令
[root@localhost Server]# rpm -ivh  tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:tftp-server            ########################################### [100%]

 

4.确认TFTP 安装完毕,在Linux 服务器控制台运行以下命令:

[root@localhost Server]# /sbin/chkconfig - - list

运行后,显示以下信息表示安装成功。

xinetd based services:

krb5-telnet: off

rsync: off

eklogin: off

gssftp: off

klogin: off

...

rsh: on

telnet: on

tftp: off

 

5.由上述输出信息可知,tftp 已经安装没有启动,在Linux 服务器控制台运行以下命令启动服务:

[root@localhost Server]#/sbin/chkconfig tftp on

安装完毕后,系统默认的tftp 服务器的根目录为/tftpboot,用户使用时需要将文件复制到该目录下。