设为首页收藏本站
查看: 17873|回复: 0

Ubuntu 和 Windows 系统安装搭建tftp服务器

[复制链接]

231

主题

64

回帖

2145

积分

管理员

积分
2145
玉米糊 发表于 2014-6-30 16:01:40 | 显示全部楼层 |阅读模式
在ARM Linux中,如果要从网络烧写内核和文件系统,就需要在主机上搭建一个tftp服务器,以便开发板上能够连接并下载启动,下面是具体步骤。

Ubuntu系统
ubuntu tftp服务器安装包括以下三个部分:
  • 1、安装tftpd(tftp服务器)
  • 2、tftp(tftp客户端)
  • 3、以及xinetd(超级服务器)

1、一键安装tftp服务器
[mw_shl_code=bash,true]$ sudo apt-get install tftpd tftp xinetd [/mw_shl_code]

2、创建/etc/xinetd.d/tftp文件,并在文件中添加如下内容:
[mw_shl_code=bash,true]service tftp {  
    socket_type = dgram
    protocol = udp
    wait = yes
    user = nobody
    server = /usr/sbin/in.tftpd
    server_args = -s /tftpboot
    disable = no
    per_source = 11
    cps = 100 2
    flags = IPv4
}[/mw_shl_code]

3、创建tftp服务器的根目录
[mw_shl_code=bash,true]
$ sudo mkdir /tftpboot   
$ sudo chmod -R 777 /tftpboot  
$ sudo chown -R nobody /tftpboot
[/mw_shl_code]

4、通过xinetd超级服务器启动tftpd
[mw_shl_code=bash,true]
$ sudo /etc/init.d/xinetd start
[/mw_shl_code]

5. 测试
[mw_shl_code=bash,true]
$ tftp 127.0.0.1
tftp> get a.txt               #其中 a.txt 是 /tftpboot 目录下的文件
[/mw_shl_code]


Windows 系统
windows下搭建 tftp服务器相对简单一些,直接下载就可以使用。
1、下载 tftpd32
本论坛下载: tftpd32.450.zip (460.06 KB, 下载次数: 13905)
官方下载:http://tftpd32.jounin.net/tftpd32_download.html

2、配置
解压/安装 tftp ,并打开,配置如下:
config.jpg

其中,
current directory是 tftp 的路径,如上是我放了开发板镜像的路径,可以按自己情况设定;
server interface 是选择具体的网卡。

transfer.jpg


上面是在客户端中回去文件,tftpd32 显示的进度条,说明工作正常。
回复

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-4-26 21:41 , Processed in 0.065637 second(s), 26 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表