Linux:TFTP,简单文件传输协议

简单文件传输协议(Trivial File Transfer Protocol, TFTP)是一种基于 UDP 协议在客户端
和服务器之间进行简单文件传输的协议。

TFTP 在传输文件时采用的是 UDP 协议,占用的端口号为 69

安装:yum install tftp-server tftp

在 RHEL 7 系统中, TFTP 服务是使用 xinetd 服务程序来管理的。

vim /etc/xinetd.d/tftp

修改:

service tftp
{
socket_type = dgram
protocol = udp

wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4

 

systemctl restart xinetd

systemctl enable xinetd

考虑到有些系统的防火墙默认没有允许 UDP 协议的 69 端口,因此
需要手动将该端口号加入到防火墙的允许策略中:

firewall-cmd --permanent --add-port=69/udp

firewall-cmd --reload

TFTP 的根目录为/var/lib/tftpboot

tftp 命令中可用的参数以及作用

Linux:TFTP,简单文件传输协议