歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux基礎知識 >> Ubuntu 8.04下搭建tftp開發davinci平台

Ubuntu 8.04下搭建tftp開發davinci平台

日期:2017/3/2 16:24:40   编辑:Linux基礎知識
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上傳/下載文件了。

Copyright © Linux教程網 All Rights Reserved