歡迎您光臨本站 註冊首頁

Ubuntu 8.04下搭建tftp開發davinci平台

←手機掃碼閱讀     火星人 @ 2014-03-12 , reply:0
   

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上傳/下載文件了。

(責任編輯:A6)



[火星人 ] Ubuntu 8.04下搭建tftp開發davinci平台已經有392次圍觀

http://coctec.com/docs/net/show-post-68248.html