Linux中TFTP使用详解
来源:互联网 发布:斗牛开挂软件 编辑:程序博客网 时间:2024/05/18 03:01
FTP协议简介
TFTP是用来下载远程文件的最简单网络协议,它其于UDP协议而实现。
linux服务器端tftp-server的配置
1、安装tftp服务器
需要安装xinetd(守护tftp)、tftp和tftp-server 3个软件
1)如果能上网,通过yum安装:
sudo yum install xinetd
sudo yum install tftp
sudo yum install tftp-server
2、配置tftp服务器
修改/etc/xinetd.d/tftp文件,将其中的disable=yes改为disable=no。开启TFTP服务
主要是设置TFTP服务器的根目录,开启服务。修改后的文件如下:
service tftp
{ socket_type =dgram
protocol =udp
wait =yes
user =root
server =/usr/sbin/in.tftpd
server_args =-s /home/mike/tftpboot -c
disable =no
per_source =11
cps =100 2
flags =IPv4
}
说明:修改项server_args= -s <path> -c,其中<path>处可以改为你的tftp-server的根目录
参数-s指定chroot,-c指定了可以创建文件。
3、启动tftp服务器并关闭防火墙
RedHat7+
systemctl disable firewall;systemctl stop firewall
systemctl enable xinetd;systemctl start xinetd
Redhat7-
/etc/init.d/iptables stop //关闭防火墙
sudo /sbin/service xinetd start
或service xinetd restart
/etc/init.d/xinetd start
看到启动[OK]就可以了
4、查看tftp服务是否开启
netstat -a | grep tftp
显示结果为
udp 0 0 *:tftp *:*
表明服务已经开启,就表明tftp配置成功了。
5、tftp使用
复制一个文件到tftp服务器目录,然后在主机启动tftp软件,进行简单测试。
登陆
tftp 192.168.1.2
tftp>get <download file>
tftp>put <upload file>
tftp>q
6、tftp命令用法如下
tftp your-ip-address
【进入TFTP操作】
connect:连接到远程tftp服务器
mode:文件传输模式
put:上传文件
get:下载文件
quit:退出
verbose:显示详细的处理信息
tarce:显示包路径
status:显示当前状态信息
binary:二进制传输模式
ascii:ascii传送模式
rexmt:设置包传输的超时时间
timeout:设置重传的超时时间
help:帮助信息
?:帮助信息
7、如果出现“AVC Denial, click icon to view”的错误,并不能传输文件
修改/etc/sysconfig/selinux,将SELINUX设定为disable
使用命令setenforce 0让selinux配置文件生效
- Linux中TFTP使用详解
- Linux中TFTP使用详解
- ARM开发板QT Linux Tftp命令使用详解
- linux中TFTP配置
- linux中TFTP配置
- linux中TFTP配置
- linux下tftp使用
- Linux tftp client使用
- linux下tftp使用
- Linux tftp client使用
- linux中tftp上传下载文件
- TFTP在linux上使用
- Linux开发心得总结21 - Busybox下tftp命令使用详解
- linux及嵌入式linux tftp使用
- Ubuntu 10.04 下 TFTP设置 及busybox 中tftp使用
- tftp server 搭建 tftp 常用命令 Busybox下tftp命令使用详解
- Busybox下tftp命令使用详解
- Busybox下tftp命令使用详解
- OpenCV putText函数
- CocoaPods安装过程及使用
- sugarorm与access to method denied
- POJ3465-Battle
- 文本处理工具sed
- Linux中TFTP使用详解
- the_number_of_javaer
- 中文乱码解决问题(转载)
- Python小练习
- FOR UPDATE
- 6.29-6.30 LL--实习日志--Restful API 概念理解+Restful_API编写
- 转:Java学习之Iterator(迭代器)的一般用法
- Android获取系统储存以及内存信息(二)
- xinhao