tftp 服务器的配置

如果用下面一条命令能够看到服务已经启动, 则不用安装, 否则需要按 1 或 2 点安装 tftp-server 服务器. [arm@localhost arm]#netstat -a | grep tftp

udp        0      0 *:tftp                  *:*

1. 从 RPM 包安装 tftp-server

从对应 Linux 操作系统版本的安装光盘上找到 tftp-server 的安装包.

下面 tftp-server-0.32-4.i386.rpm 包为例,把 rpm 包拷贝到 dev_home/btools/下. [arm@localhost arm]#cp tftp-server-0.32-4.i386.rpm /home/arm/dev_home/btools/ [arm@localhost arm]#su root

[root@localhost arm]#rpm -q tftp-server

如果没有安装 tftp-server,就要用下面命令安装,否则,直接进入第 2 步配置服务. [root@localhost arm]#cd /home/arm/dev_home/btools/ [root@localhost btools]#rpm -ivh tftp-server-0.32-4.i386.rpm

建立 tftp 的主工作目录

[root@localhost btools]#mkdir /tftpboot

2. 修改配置文件并启动服务 备份配置文件

[root@localhost btools]#if [ -f /etc/xinetd.d/tftp ]

> then

> cp /etc/xinetd.d/tftp /etc/xinetd.d/tftp.old

> fi

修改配置文件

[root@localhost btools]#vi /etc/xinetd.d/tftp service tftp

{

disable = no

socket_type             = dgram

protocol                = udp

wait                    = yes

user                    = root

server                  = /usr/sbin/in.tftpd

server_args             = -s /tftpboot

per_source              = 11

cps                     = 100 2

flags                   = IPv4

}

检查 tftp 服务是否打开

[root@localhost btools]#chkconfig --list

如果 tftp 的服务没有打开,则用下面命令打开 tftp 服务开关 [root@localhost btools]#chkconfig tftp on

重启服务

#/etc/init.d/xinetd restart

#netstat -a | grep tftp

udp        0      0 *:tftp                  *:*

原文地址:https://www.cnblogs.com/fanweisheng/p/11102964.html