您的位置:首页 > 运维架构 > Linux

Linux下的TFTP软件的安装设置(TQ210)-ubuntu11.10

2013-06-10 11:29 627 查看
1、#sudo apt-get install tftpd tftp xinetd (root登录就不用sudo,以下类同);

root@ljf-desktop:~# apt-get install tftpd tftp xinetd

正在读取软件包列表... 完成

正在分析软件包的依赖关系树

正在读取状态信息... 完成

下列【新】软件包将被安装:

tftp tftpd xinetd

升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 530 个软件包未被升级。

需要下载 180kB 的软件包。

解压缩后会消耗掉 561kB 的额外空间。

获取:1 http://cn.archive.ubuntu.com/ubuntu/ lucid/universe tftp 0.17-17ubuntu1 [17.6kB]

获取:2 http://cn.archive.ubuntu.com/ubuntu/ lucid/main xinetd 1:2.3.14-7ubuntu3 [146kB]

获取:3 http://cn.archive.ubuntu.com/ubuntu/ lucid/universe tftpd 0.17-17ubuntu1 [16.5kB]

下载 180kB,耗时 2秒 (65.7kB/s)

选中了曾被取消选择的软件包 tftp。

(正在读取数据库 ... 系统当前总共安装有 136049 个文件和目录。)

正在解压缩 tftp (从 .../tftp_0.17-17ubuntu1_i386.deb) ...

选中了曾被取消选择的软件包 xinetd。

正在解压缩 xinetd (从 .../xinetd_1%3a2.3.14-7ubuntu3_i386.deb) ...

选中了曾被取消选择的软件包 tftpd。

正在解压缩 tftpd (从 .../tftpd_0.17-17ubuntu1_i386.deb) ...

正在处理用于 man-db 的触发器...

正在处理用于 ureadahead 的触发器...

ureadahead will be reprofiled on next reboot

正在设置 tftp (0.17-17ubuntu1) ...

正在设置 xinetd (1:2.3.14-7ubuntu3) ...

* Stopping internet superserver xinetd [ OK ]

* Starting internet superserver xinetd [ OK ]

正在设置 tftpd (0.17-17ubuntu1) ...

Note: xinetd currently is not fully supported by update-inetd.

Please consult /usr/share/doc/xinetd/README.Debian and itox(8).

2、本来是要修改文件/etc/xinetd.d/tftp配置文件,但是我没发现这个文件。那我们就自 己新建这个配置文件,

#sudo vim tftp(或gedit tftp)

在里面输入:

service tftp

{

socket_type = dgram

protocol = udp

wait = yes

user = root

server = /usr/sbin/in.tftpd

server_args = -s /tftpboot

disable = no

per_source = 11

cps = 100 2

flags = IPv4

}

3、创建tftp根目录,启动tftp-server。

输入如下命令:

#mkdir /tftpboot /*在根目录下建立tftpboot文件夹,注意与mkdir tftpboot的区别*/

#chmod o+w /tftpboot

#service xinetd restart

这样,tftp-server就启动了,将要烧写的镜像移到tftpboot目录下

4、

至此Ubuntu tftp服务已经安装完成了,下面可以对其进行一下测试。(在当前目创建2.c,在tftpboot目录下创建1.c和2.c,且tftpboot目录下2.c权限为777)

执行get命令时,保证tftpboot目录下的文件权限为777,

执行put命令时,必须先在tftpboot目录下新建一个和上传文件同名的文件且权限为777.

root@ljf-desktop:/home# tftp 127.0.0.1

tftp> get 1.c

Received 7 bytes in 0.1 seconds

tftp> put 2.c

Sent 10 bytes in 0.0 seconds

tftp> quit
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: