ubuntu 14.04 配置tftp服务器
2015-11-21 15:29
666 查看
嵌入式开发中,内核的加载以及一些文件的传输经常会用到tftp服务器,在此对配置方法做简单介绍:
1,下载安装
$sudo apt-get install tftpd tftp openbsd-inetd
2,修改配置文件
<pre name="code" class="plain">$sudo vi /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 dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot
3,建立tftp目录
$sudo mkdir /home/thx/tftproot
$sudo chmod 777 /tftproot
4,重启
$sudo /etc/init.d/openbsd.inetd restart
5,查看69端口是否打开:
$sudo netstat -an | grep udp
6,本机测试
$tftp 127.0.0.1
$get testfile
$put testfile
$q
问题:“tftp: server error(2) Access violation”
原因:tftp默认可以下载,但上传需要在tftp目录下面有一个同名的文件,并且具有读写权限
7,busybox中tftp用法说明
tftp [OPTION] ... HOST [PORT]
OPTION:
-l file 本地文件
-r file 远程文件
-g 下载
-p 上传
下载:
#tftp -r test.txt -g 192.168.1.150
上传:
#tftp -l test.txt -r -p 192.168.1.150
1,下载安装
$sudo apt-get install tftpd tftp openbsd-inetd
2,修改配置文件
<pre name="code" class="plain">$sudo vi /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 dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftproot
3,建立tftp目录
$sudo mkdir /home/thx/tftproot
$sudo chmod 777 /tftproot
4,重启
$sudo /etc/init.d/openbsd.inetd restart
5,查看69端口是否打开:
$sudo netstat -an | grep udp
6,本机测试
$tftp 127.0.0.1
$get testfile
$put testfile
$q
问题:“tftp: server error(2) Access violation”
原因:tftp默认可以下载,但上传需要在tftp目录下面有一个同名的文件,并且具有读写权限
7,busybox中tftp用法说明
tftp [OPTION] ... HOST [PORT]
OPTION:
-l file 本地文件
-r file 远程文件
-g 下载
-p 上传
下载:
#tftp -r test.txt -g 192.168.1.150
上传:
#tftp -l test.txt -r -p 192.168.1.150
相关文章推荐
- Ubuntu 默认壁纸历代记
- Ubuntu Remix Cinnamon 20.04 评测:Ubuntu 与 Cinnamon 的完美融合
- 关于Ubuntu 11.10启动提示waiting for the network configuration的问题
- 在 Ubuntu 桌面中使用文件和文件夹
- ubuntu下chrome无法同步问题解决
- Ubuntu Linux使用体验
- 使用 GNOME 优化工具自定义 Linux 桌面的 10 种方法
- 以Ubuntu 9.04为例 将工作环境迁移到 Linux
- 如何在 Fedora 上建立一个 TFTP 服务器
- VirtualBox虚拟机XP与宿主机Ubuntu互访共享文件夹
- 从USB安装Ubuntu Server 10.04.3 图文详解
- Ubuntu 15.04 正式版发布下载
- Linux-Ubuntu 10.04安装Cadence-ic610 方法总结图解
- Ubuntu 12.04和Windows 7双系统安装图解
- 开机出现:grub rescue的修复方法
- Ubuntu连接Android真机调试
- 你应该选择 Ubuntu 还是 Fedora?
- 100 个最佳 Ubuntu 应用(中)
- 看看我的Ubuntu Linux截图
- Ubuntu 12.04 LTS服务器版安装过程及使用图解