gzyueqian
13424082685
首页 > 新闻中心 > > 正文

Ubuntu 8.04下搭建tftp开发davinci平台

更新时间: 2008-05-29 14:28:20来源: 粤嵌教育浏览量:1274

  1、首先安装tftp和tftpd,前者是客户端,后者是服务器。因为tftp是要inetd来控制的,而ubuntu类的系统,默认是没有安装inetd的,安装一下。(我次失败了就是因为没有安装正确的inetd)

  #apt-get install tftp tftpd

  #apt-get install netkit-inetd

  2、在/目录下建一个tftpboot, 把属性改成777。

  #cd /

  #mkdir tftpboot

  #chmod 777 tftpboot

  3、修改/etc/inetd.conf

  #emacs /etc/inetd.conf

  tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot

  #:INTERNAL: Internal services

  #echo stream tcp nowait root internal

  #echo dgram udp wait root internal

  #chargen stream tcp nowait root internal

  #chargen dgram udp wait root internal

  #discard stream tcp nowait root internal

  #discard dgram udp wait root internal

  #daytime stream tcp nowait root internal

  #daytime dgram udp wait root internal

  #time stream tcp nowait root internal

  #time dgram udp wait root internal

  #tftp dgram udp wait nobody /usr/sbin/tcpd/usr/sbin/in.tftpd/tftpboot

  4、重新加载inetd进程

  #/etc/init.d/inetd reload

  5、测试tftpd服务是否成功

  tftp localhost

  tftp> put mydoc.tar.gz

  tftp> put test.log

  tftp> get test.log

  tftp> get mydoc.tar.gz

  tftp>

  上述表明在主机上测试tftp成功,在DM6446板子上,以root登录,使用busybox附带的tftp客户端上传/下载文件:

  root@DVS6446:/tftp -r thttpd.conf -g 192.168.1.110

  竟然出错,老是time out!查找原因,还是归结到防火墙了。防火墙本是个好东西,但好东西在特定的环境下往往成为坏东西,关闭防火墙之后就顺利实现tftp上传/下载文件了。

免费预约试听课