安装相关软件包:tftpd ftp xinetd
$sudo apt-get install tftpd tftp xinetd
建立tftp服务文件目录并且更改其权限
$cd /
$sudo mkdir tftpboot
$sudo chmod 777 tftpboot -R
修改/etc/inetd.conf配置文件中tftp专用目录的地址
$sudo vim /etc/inetd.conf
将如下内容
## sane-port stream tcp nowait saned:saned /usr/sbin/saned saned
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
改成如下:
## sane-port stream tcp nowait saned:saned /usr/sbin/saned saned
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
在/etc/xinetd.d/下建立一个名为tftp配置文件
$sudo vim /etc/xinetd.d/tftp
在文件中输入以下内容:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
}
重新启动服务
$sudo /etc/init.d/xinetd restart
本文介绍如何在Linux系统上安装并配置TFTP服务。包括安装所需软件包、设置服务目录及权限、修改配置文件等步骤。
1326

被折叠的 条评论
为什么被折叠?



