当前位置: 首页 > 工具软件 > tftpd-hpa > 使用案例 >

ubuntu中 tftp 服务器搭建 tftpd-hpa

夏侯楷
2023-12-01

    tftp 服务器搭建:

    装在客户端和服务端
    apt-get install tftp tftpd-hpa

    若没有安装守护进程 xinetd
    apt-get install xinetd

    在/etc/xinetd 路径下创建tftp文件,内容如下:
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /var/tftpboot/
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
    }

    创建文件 /etc/default/tftpd-hpa ,内容如下:

    TFTP_USERNAME=“tftp”
    TFTP_DIRECTORY="/home/zhoudy/tftpboot"
    TFTP_ADDRESS=“0.0.0.0:69”
    TFTP_OPTIONS="-l -c -s"

    更改tftp根路径的权限
    chmod 777 /var/tftpboot/

    重启服务xinetd守护进程服务
    /etc/init.d/xinetd restart

    重启tftp服务
    /etc/init.d/ tftpd-hpa restart

测试:
本地测试:
tftp 127.0.0.1

>get file
 

 类似资料: