ubuntu-8.04环境下tftp服务器的建立
-
- 帖子: 41
- 注册时间: 2008-05-28 18:15
ubuntu-8.04环境下tftp服务器的建立
我在建立TFTP服务器的时候,虽然google到不少,但发现多少有点问题,也许是我的操作有误,现把我建立TFTP过程例出来,有问题的大家一起探讨
1.安装程序
sudo apt-get install tftp tftpd
前者是客户端,后者是服务程序。
sudo apt-get install xinetd
2.在/目录下建一个tftpboot, 把属性改成777。
cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot
3.sudo vi /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
4.sudo vi /etc/xinetd.d/tftp
tftp内容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}
5.重新启动服务:
sudo /etc/init.d/xinetd restart
sudo in.tftpd -l /tftpboot
6.测试一下,在/tftpboot文件夹下新建立一个文件
touch test
进入另外一个文件夹
tftp 192.168.0.38 【IP自行修改】
tftp> get test
是不是工作正常了呢?
现在把你编译好的内核文件拷贝到/tftpboot下面,就可以使用u-boot的tftp命令加栽内核到目标板内存了。
1.安装程序
sudo apt-get install tftp tftpd
前者是客户端,后者是服务程序。
sudo apt-get install xinetd
2.在/目录下建一个tftpboot, 把属性改成777。
cd /
sudo mkdir tftpboot
sudo chmod 777 tftpboot
3.sudo vi /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
4.sudo vi /etc/xinetd.d/tftp
tftp内容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}
5.重新启动服务:
sudo /etc/init.d/xinetd restart
sudo in.tftpd -l /tftpboot
6.测试一下,在/tftpboot文件夹下新建立一个文件
touch test
进入另外一个文件夹
tftp 192.168.0.38 【IP自行修改】
tftp> get test
是不是工作正常了呢?
现在把你编译好的内核文件拷贝到/tftpboot下面,就可以使用u-boot的tftp命令加栽内核到目标板内存了。
-
- 帖子: 13
- 注册时间: 2007-01-31 18:20
Re: ubuntu-8.04环境下tftp服务器的建立
支持一下,大多数都没提那个inetd.conf.
这个版的人真少阿
这个版的人真少阿
- Jarson
- 帖子: 2371
- 注册时间: 2008-07-21 9:44
- 来自: 深圳
- 联系:
-
- 帖子: 4
- 注册时间: 2009-05-18 10:57
Re: ubuntu-8.04环境下tftp服务器的建立
楼主,你好!在进行到tftp> get test时,跳出了如下错误:error code 4:unsupported tranfer mode
请问是怎么回事呀?
请问是怎么回事呀?
-
- 帖子: 41
- 注册时间: 2008-05-28 18:15
Re: ubuntu-8.04环境下tftp服务器的建立
不知道你是在什么情况下遇到这种情况的?zq88295513 写了:楼主,你好!在进行到tftp> get test时,跳出了如下错误:error code 4:unsupported tranfer mode
请问是怎么回事呀?
-
- 帖子: 4
- 注册时间: 2009-05-18 10:57
Re: ubuntu-8.04环境下tftp服务器的建立
回楼主,是写到命令tftp> get test 时就出错,也不知道是什么问题,前面是没啥问题的
- lerosua
- 论坛版主
- 帖子: 8455
- 注册时间: 2007-11-29 9:41
- 联系:
Re: ubuntu-8.04环境下tftp服务器的建立
收藏,下次重装系统得来找
-
- 帖子: 41
- 注册时间: 2008-05-28 18:15
Re: ubuntu-8.04环境下tftp服务器的建立
你的测试是在安装了tftpd的机器上进行的吗?zq88295513 写了:回楼主,是写到命令tftp> get test 时就出错,也不知道是什么问题,前面是没啥问题的
-
- 帖子: 1
- 注册时间: 2009-02-27 10:01
Re: ubuntu-8.04环境下tftp服务器的建立
楼主你好,我按照这种方式装了一遍,在本机上也能get下来,可是从别的主机就get不到我建立的tftpboot目录下的uImage,请问是怎么回事呢?
-
- 帖子: 3
- 注册时间: 2008-09-29 0:04
Re: ubuntu-8.04环境下tftp服务器的建立
谢谢楼主了!!!
- Jarson
- 帖子: 2371
- 注册时间: 2008-07-21 9:44
- 来自: 深圳
- 联系:
Re: ubuntu-8.04环境下tftp服务器的建立
如果配置了/etc/inetd.conf,不用配置/etc/xinetd.d/tftp都可以了
即第3、4步选其中之一则可3.sudo vi /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /tftpboot
4.sudo vi /etc/xinetd.d/tftp
tftp内容:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
}