CentOS7下的tftp安装

2021/6/27 7:13:58

本文主要是介绍CentOS7下的tftp安装,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

一、tftp服务原理

  tftp(trivial file transfer protocal,简单文件传输协议)是居于UDP协议实现的,使用UDP67端口,提供不可靠的数据流传输服务,使用超时重传方式保证数据到达。

  特点:

    1、tftp在运行中不得断开链接

    2、tftp默认属性是在上传和下载的时候采用默认覆盖不提示方式。

    3、tftp上传的文件可能会加上只读属性。

二、tftp的安装’

yum install xinetd tftp tftp-server        # root 用户执行
sudo yum install xinetd tftp tftp-server   # 普通用户执行

三、服务配置

[root@localhost ~]# cat /etc/xinetd.d/tftp 
# default: off
# description: 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 /var/lib/tftpboot -c   # 注意这行,如果允许上传,一定要加上参数 -c
    disable            = no   # 这行默认为yes,改成no,允许
    per_source         = 11
    cps                = 100 2
    flags              = IPv4
}

三、启动服务

[root@localhost ~]#systemctl restart xinetd.service 
[root@localhost ~]# netstat -a | grep tftp 
udp        0      0 0.0.0.0:tftp            0.0.0.0:*                          
udp6       0      0 [::]:tftp               [::]:* 
[root@localhost ~]# netstat -tunap | grep :69
udp        0      0 0.0.0.0:69              0.0.0.0:*                           30014/xinetd        
udp6       0      0 :::69                   :::*                                1/systemd  

 



这篇关于CentOS7下的tftp安装的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程