Ubuntu下tftp的安装
2010-11-01 10:00
253 查看
1. sudo apt-get install tftp-hpa tftpd-hpa
sudo apt-get install xinetd
sudo apt-get install netkit-inetd
2. cd /
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
3. sudo in.tftpd -l /tftpboot
这样tftp服务器就启动了,下面可以做一个测试
4. cd /tftpboot
touch test
建立一个文件
5. cd /home/usrname
登录另一个目录
6. tftp 192.168.0.59
换成自己的ip
> get /tftpboot/test
打开目录 /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 -c
per_source = 11
cps = 100 2
}
重新启动服务:
sudo /etc/init.d/xinetd restart
sudo in.tftpd -l /tftpboot
安装过程中出现的问题及原因
现象一:
tftp> get test.log
Transfer timed out.
原因:
tftpd服务没有启动
现象二:
tftp> get test.log
Error code 2: Only absolute filenames allowed
原因:
在/etc/xinetd.d/tftpd中设置的server_args为/etc/default/tftpd-hpa
cat /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="no"
OPTIONS="-s /home/tftpd -c -p -U 077 -u tftpd"
设置的时候只要将server_args=改为你自己设定的服务器文件夹就行了
现象三:
tftp> put ex070416.log
Error code 1: File not found
原因:
指定的文件不存在;或tftpd启动参数中没有指定-c选项,允许上传文件
sudo apt-get install xinetd
sudo apt-get install netkit-inetd
2. cd /
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot
3. sudo in.tftpd -l /tftpboot
这样tftp服务器就启动了,下面可以做一个测试
4. cd /tftpboot
touch test
建立一个文件
5. cd /home/usrname
登录另一个目录
6. tftp 192.168.0.59
换成自己的ip
> get /tftpboot/test
打开目录 /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 -c
per_source = 11
cps = 100 2
}
重新启动服务:
sudo /etc/init.d/xinetd restart
sudo in.tftpd -l /tftpboot
安装过程中出现的问题及原因
现象一:
tftp> get test.log
Transfer timed out.
原因:
tftpd服务没有启动
现象二:
tftp> get test.log
Error code 2: Only absolute filenames allowed
原因:
在/etc/xinetd.d/tftpd中设置的server_args为/etc/default/tftpd-hpa
cat /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="no"
OPTIONS="-s /home/tftpd -c -p -U 077 -u tftpd"
设置的时候只要将server_args=改为你自己设定的服务器文件夹就行了
现象三:
tftp> put ex070416.log
Error code 1: File not found
原因:
指定的文件不存在;或tftpd启动参数中没有指定-c选项,允许上传文件
相关文章推荐
- [3]_嵌入式开发环境搭建1_在ubuntu16.04.3 安装配置nfs 和 tftp服务器
- Ubuntu 10.04安装tftp
- ubuntu 之 安装TFTP server
- 安装Ubuntu TFTP 、NFS、SAMBA服务小记
- ubuntu 上安装tftp (在ubuntu8.10上一定可以成功)
- ubuntu安装tftp
- ubuntu10.10安装TFTP
- Ubuntu 12.04 安装TFTP server
- ubuntu10.04 安装配置tftp
- Ubuntu 10.10下安装TFTP的步骤 tftp -hpa版本
- ubuntu下搭建nfs,tftp,安装qt等一些基本的启动bootloader前的服务
- 关于Ubuntu14.04安装配置tftp
- ubuntu 安装tftp
- Ubuntu 安装tftp服务器
- kickstart+pxe+httpd+dhcp+tftp自动安装Ubuntu 12.04
- ubuntu下安装tftp服务
- ubuntu下安装tftp
- Ubuntu-12.04下安装、配置tftp服务器的简易操作方法
- ubuntu10.04/12.10下安装tftp
- Ubuntu中安装tftp服务的方法