在嵌入式环境下开发,tftp服务器是很常用的,但Ubuntu缺省是不安tftp服务的,所以需要额外安装。以下是操作步骤:
1、sudo apt-get install tftp-hpa tftpd-hpa
2、修改/etc/default/tftpd-hpa,注意修改前要增加写属性:
RUN_DAEMON = "yes"
OPTIONS="-l -s /var/lib/tftpboot -c"
3、sudo chmod 777 /var/lib/tftpboot
4、sudo /etc/init.d/tftpd-hpa start
现在就可以get或put文件了, 当然这是standalone运行方式,如果要用xinetd启动方式,还需要安装xinetd并建tftpd配置文件。