debian开发环境:tftp服务
来源:互联网 发布:大乐透彩神通软件17072 编辑:程序博客网 时间:2024/06/06 11:37
使用debian作为开发服务器,需要用到tftp服务。安装配置笔记如下:
安装:
apt-get install xinetd tftpd tftp
提示没有tftpd,使用命令debian:xinetd.d# apt-get install tftpd*
来安装tftpd,自动安装的是tftpd-hpa。
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
注意,根据正则表达式“tftpd*”选中了 tftpd-hpa
注意,根据正则表达式“tftpd*”选中了 tftpd
注意,根据正则表达式“tftpd*”选中了 tftp
注意,根据正则表达式“tftpd*”选中了 atftpd
将会安装下列额外的软件包:
tftpd-hpa
下列【新】软件包将被安装:
tftpd-hpa
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件未被升级。
需要下载 0B/34.6kB 的软件包。
解压缩后会消耗掉 98.3kB 的额外空间。
您希望继续执行吗?[Y/n]y
正在预设定软件包 ...
选中了曾被取消选择的软件包 tftpd-hpa。
(正在读取数据库 ... 系统当前总共安装有 97571 个文件和目录。)
正在解压缩 tftpd-hpa (从 .../tftpd-hpa_0.48-2.3_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 tftpd-hpa (0.48-2.3) ...
--------- IMPORTANT INFORMATION FOR XINETD USERS ----------
The following line will be added to your /etc/inetd.conf file:
tftp dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /var/lib/tftpboot
If you are indeed using xinetd, you will have to convert the
above into /etc/xinetd.conf format, and add it manually. See
/usr/share/doc/xinetd/README.Debian for more information.
Suggested entry (automatically converted using itox):
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
}
-----------------------------------------------------------
tftpd-hpa disabled in /etc/default/tftpd-hpa
debian:xinetd.d#
百度一下inetd 和xinetd:
每个 UNIX 管理员都熟悉 inetd,inetd 是一个守护程序,通过一个集中的配置文件(inetd.conf)来管理大多数入网连接。xinetd 守护程序是 inetd 的替代,它提供许多改进的或新的特性,以及更容易的配置。Ted 解释了 inetd 背后的概念,并且给出了在您自己的站点上设置 xinetd 的示例。
经典的 inetd 守护程序已经存在很久了。有几种替换 inetd 的功能的方法,但是最灵活、最简便的方法似乎是 xinetd。inetd 能做的,xinetd 也能做,并且 xinetd 还能做更多的事情。譬如,TCP 封装、模块化配置、连接重定向和入站连接的负载限制,而这些只是使得 xinetd 成为系统管理员良好选择的部分特性。
OK,那我们就用xinetd。
根据提示,将/etc/inetd.conf 的tftp配置删掉。
将下面的内容保存在文件tftp里,放到/etc/xinetd.d/下面。
# description: The tftp server serves files using the trivial file transfer /
# protocol. The tftp protocol is often used to boot diskless /
# workstations, download configuration files to network-aware printers, /
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot //这个是修改过的,你的tftpboot目录是啥,就写啥在这里,注意此目录应该是可读写的权限。不然测试时会报错:Error code 0: Permission denied
}
然后重新启动xinetd服务:
/etc/init.d/xinetd reload
或者
/etc/init.d/xinetd restart
测试tftp服务:放一个文件test 在/tftpboot下面。
在debian服务器本机上测试(本机ip 192.168.10.74):
tftp 192.168.10.74
tftp> get abc
Received 66 bytes in 0.0 seconds
当使用tftp> put abc的时候,常常提示Error code 1: File not found,
需要在tftpboot里面先touch一个空的文件,名字叫做abc,在使用 put,才可以ok。WHy?????
tftp> put abc
Sent 29 bytes in 0.0 seconds
tftp> q
在windows下也可以测试:
Transfers files to and from a remote computer running the TFTP service.
TFTP [-i] host [GET | PUT] source [destination]
-i Specifies binary image transfer mode (also called
octet). In binary image mode the file is moved
literally, byte by byte. Use this mode when
transferring binary files.
host Specifies the local or remote host.
GET Transfers the file destination on the remote host to
the file source on the local host.
PUT Transfers the file source on the local host to
the file destination on the remote host.
source Specifies the file to transfer.
destination Specifies where to transfer the file.
C:/Documents and Settings/Administrator>tftp -i 192.168.10.102 GET abc
Transfer successful: 66 bytes in 1 second, 66 bytes/s
- debian开发环境:tftp服务
- U-Boot 开发环境篇 Kermit 、 tftp服务
- debian 安装开发环境
- debian服务基础环境搭建
- 搭建开发环境----安装tftp
- Linux环境下配置tftp服务
- 2、TFTP服务(宿主机环境搭建)
- Linux C 开发环境(debian)
- debian安装android开发环境
- Debian开发环境安装指南
- Debian开发环境安装指南
- Debian安装使用tftp
- 嵌入式linux的tftp开发环境建立
- Android 搭建tftp-nfs开发环境文档
- TFTP 服务
- tftp服务
- tftp服务
- tftp服务
- java swing 画图并合并生成图片
- 游侠在线自由测试版正式发布啦!!!
- 学习笔记
- 利用.NET的XML序列化解决系统配置问题; .NET对象的XML序列化和反序列化
- 《Visual C++2010开发权威指南》版权输出台湾香港新加坡---大陆C++超越并引领台湾
- debian开发环境:tftp服务
- Log4Net使用指南
- Log4Net使用指南
- c++编码中的简单体会(不断补充)
- Flex基础-----之DataProvider详解
- 几步把你的程序做成服务
- 创建表(创建相同表结构并且复制表中的数据)
- Microsoft .Net Remoting系列专题之三:Remoting事件处理全接触
- 【飞秋】关于结构体和结构体指针的P-INVOKE