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