你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu下tftp的安装

[日期:2007-08-26] 来源:Linux公社  作者:Linuxidc [字体:大 中 小]

1. sudo apt-get install tftp-hpa tftpd-hpa

   sudo apt-get install xinetd

   sudo apt-get install  netkit-inetd

2. cd /

      sudo mkdir /tftpboot

       sudo chmod 777 /tftpboot

3. sudo in.tftpd -l /tftpboot

    这样tftp服务器就启动了,下面可以做一个测试

4. cd /tftpboot

    touch test

    建立一个文件

5. cd /home/usrname

    登录另一个目录

6. tftp 192.168.0.59

    换成自己的ip

   > get /tftpboot/test

打开目录 /etc/xinetd.d/

新建文件tftp

tftp内容:

service tftp

{

    disable = no

    socket_type     = dgram

    protocol            = udp

    wait                    = yes

    user             = root

    server          = /usr/sbin/in.tftpd

    server_args     = -s /tftpboot -c

    per_source      = 11

    cps         = 100 2

}

重新启动服务:

sudo /etc/init.d/xinetd restart

sudo in.tftpd -l /tftpboot

安装过程中出现的问题及原因

现象一:

tftp> get test.log

Transfer timed out.

原因:

tftpd服务没有启动

现象二:

tftp> get test.log

Error code 2: Only absolute filenames allowed

原因:

在/etc/xinetd.d/tftpd中设置的server_args为/etc/default/tftpd-hpa

cat /etc/default/tftpd-hpa

#Defaults for tftpd-hpa

RUN_DAEMON="no"

OPTIONS="-s /home/tftpd -c -p -U 077 -u tftpd"

设置的时候只要将server_args=改为你自己设定的服务器文件夹就行了

现象三:

tftp> put ex070416.log

Error code 1: File not found

原因:

指定的文件不存在;或tftpd启动参数中没有指定-c选项,允许上传文件

linux
相关资讯       tftp安装 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款