2. sudo gvim /etc/inetd.conf
找到如下配置:
#:BOOT: TFTP service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp (/srv/tftp 为默认tftp目录)
配置自己的tftp目录:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /home/nitonggui/tftp
3.创建目录:mkdir /home/nitonggui/tftp ; 修改文件权限为777
4.$sudo /etc/init.d/openbsd-inetd restart
5.查看69端口是否有打开 :netstat -an | more| grep udp
udp 0 0 0.0.0.0:69 0.0.0.0:*
6.本机测试:
a.在/home/nitonggui/tftp目下新建一个文件,并写入数据:
#gedit 123.txt
b. 到/home目录下
#tftp 221.204.110.99[注:这是本机的IP地址]
tftp> get 123.txt
Received 12 bytes in 0.0 seconds
tftp> quit
行了,本地测试成功!
7.在开发板上使用tftp
只需要将开发板和主机设在同一网段即可。