ubuntu-12搭建tftp服务器

搭建tftp服务器

在嵌入式linux的开发当中,经常会采用tftp的方式更新firmware。所有了解如何搭建一台tftp服务器是很有必要的,这样在开发当中可以大大节约我们的时间。

环境 ubuntu12

安装软件包

$ sudo apt-get install xinetd tftpd tftp

创建/etc/xinetd.d/tftp

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}

创建服务器目录

sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot

重新启动xinetd服务

sudo service xinetd restart

这是后,tftp服务器已经开始运行了。

测试我们的tftp服务器

在/tftpboot中创建一个文件

echo "test" > test

从tftp服务器获得test文件

tftp 192.168.1.117
tftp> get test
tftp> quit

参考连接

http://askubuntu.com/questions/201505/how-do-i-install-and-run-a-tftp-server

猜你喜欢

转载自blog.csdn.net/hnhkj/article/details/52035702