Linux环境下,TFTP配置详细过程如下:
1. tftp (optional, if you need to do target development work)
1). install tftp-server
#: apt-get install tftpd-hpa
2). #make a directory for tftp root directory
#: sudo mkdir /tftproot;sudo chmod 777 /tftproot
3). Modify the configuration file of tftpd
Change /etc/default/tftpd-hpa:
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
#TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_DIRECTORY="/tftproot"
TFTP_ADDRESS="0.0.0.0:69"
#TFTP_OPTIONS="--secure"
TFTP_OPTIONS="-l -c -s"
4). Restart tftp-hap service
#: sudo service tftp-hpa restart
if show:
> tftpd-hpa start/running, process 5332
means tftpd-hpa has prepared ok
5). Test the tftpd whether work fine
#: cd ~
#: echo "testL" > testl
#: sudo echo "testA" > /tftproot/testa
#: tftp localhost(or local ip)
tftp> put testl
tftp> get testa
tftp> q
Check the content and position of testl and testa.
Windows环境下,下载思科TFTP服务器, 资源http://d.download.csdn.net/down/2413416/wtt234
注: DOS默认支持tftp cmd like:
tftp 192.168.5.30 GET 1.txt 1.txt