tftp的安装及配置

1.安装tftp服务客户端
sudo apt-get install tftp

2.安装tftp服务器端
sudo apt-get install tftpd

3.安装xinetd
注意同类似的还有openbsd-inetd和inetutils-inetd,而netkit-inetd是不存在的,是个虚拟包
sudo apt-get install xinetd

4.建立tftp目录
cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot
 
5.配置xinetd及tftp
在/etc/inetd.conf中加入如下一行:
tftp        dgram    udp    wait    nobody    /usr/sbin/tcpd    /usr/sbin/in.tftpd /tftpboot

编辑/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
    per_source      = 11
    cps             = 100 2
    flags        = IPv4
}
-------------------------------

6.重启xinetd
sudo /etc/init.d/xinetd reload

7.测试tftp

cd /tftpboot
touch aaa

然后在另一个文件夹中
cd ~
tftp localhost
$tftp->get aaa
$tftp->q

 

http://blog.sina.com.cn/s/blog_8738908f0100v864.html

posted @ 2017-02-07 21:24  findumars  Views(1859)  Comments(0Edit  收藏  举报