wengshangli的笔记 https://bbs.21ic.com/?615004 [收藏] [复制] [RSS]

日志

redhat tftp服务器的架设

已有 771 次阅读2012-4-8 13:34 |个人分类:linux|系统分类:嵌入式系统| tftp, 服务器, linux

虽然ubuntu/centos/redhat都是linux,但是内核其中存在一定的修改,所以对于tftp服务器的安装存在不同的命令。在这里由于自己安装的是redhat,所以采用rpm方式安装,这种方式理论上能够适用与几乎所有不同版本的linux系统(没有亲自实践)。这里讨论自己在进行tftp服务器安装的时候遇到的问题及解决:


# rpm -ivh tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 4f2a6fd2: NOKEY
error: Failed dependencies:
    xinetd is needed by tftp-server-0.42-3.1.i386


注:rpm -i为最简安装命令,v表示显示进度,h表示用#显示进度

在安装上述rpm包之前,需要先安装xinetd补丁,在网络上下载xinetd-2.3.14-10.el5.i386.rpm安装后,再安装tftp-server-0.42-3.1.i386.rpm,即可:

[root@wengshangli OS-exercise]# rpm -ivh xinetd-2.3.14-10.el5.i386.rpm
warning: xinetd-2.3.14-10.el5.i386.rpm: Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY
Preparing...                ########################################### [100%]
   1:xinetd                 ########################################### [100%]
[root@wengshangli OS-exercise]# rpm -ivh tftp-server-0.42-3.1.i386.rpm
warning: tftp-server-0.42-3.1.i386.rpm: Header V3 DSA/SHA1 Signature, key ID 4f2a6fd2: NOKEY
Preparing...                ########################################### [100%]
   1:tftp-server            ########################################### [100%]




建立tftp的主工作目录
[root@wengshangli OS-exercise]# mkdir /tftpboot


 修改配置文件
[root@localhost Server]# vi /etc/xinetd.d/tftp


实际中改动了一个地方:



# default: off
# deion: The tftp server serves files using the trivial file transfer \

      protocol.  The tftp protocol is often used to boot diskless \

      workstations, download configuration files to network-aware printers, \

      and to start the installation process for some operating systems.

service tftp

{

        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot
        disable                 = no(yes改为了no)
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}


重启服务


[root@localhost Server]# /etc/init.d/xinetd restart
Stopping xinetd:                                           [失败]
Starting xinetd:                                            [成功]

查看是否启动
[root@localhost Server]# netstat -a |grep tftp
udp            0 *:tftp                      *:*   


路过

鸡蛋

鲜花

握手

雷人

评论 (0 个评论)