tftp
首先tftp全称为Trivial File Transfer Protocol,简单文件传输协议,是TCP/IP协议中提供简单,小文件传输的协议
tftp是udp的,而且端口是69
tftp不具备通常的ftp的许多功能,它只能从文件服务器上获得或写入文件,不能列出目录,不进行认证,它传输8位数据。传输中有三种模 式:netascii,这是8位的ASCII码形式,另一种是octet,这是8位源数据类型;最后一种mail已经不再支持,它将返回的数据直接返回给 用户而不是保存为文件
tftp配置文件:/etc/xinetd.d/tftp,因为tftp太小就挂在xinetd服务下面了,所以配置文件和启动,关闭都是通过xinetd了
配置文件详解:vim /etc/xinetd.d/tftp
service tftp
{
socket_type = dgram
protocol = udp //使用的协议
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home //存放文件的路径,修改了路径就必须关闭iptables和selinux-->service iptables stop;setenforce 0 ,-s 是下载功能-c 是上传功能,如果上传不就就把chmod 777 /home
disable = no //默认是yes,把其改成no
per_source = 11
cps = 100 2
flags = IPv4
}
启动tftp服务:service xinetd start -- /etc/init.d/xinetd start --chkconfig xinetd on/off -- chkconfig --lever 345 xinetd on
关闭tftp服务:service xinetd stop--/etc/init.d/xinetd stop
查看自己安装了tftp服务端和客户端没有--which tftp,如果没有安装就安装光盘里面的tftp-xx.rpm(客户端),tftp-server-xx.rpm(服务端)
服务端只需要把文件放在tftp的路径即可,客户端就是直接tftp 192.168.##.##;
?/help帮助;get FileName;put FileName;get FileName /home/yyj/abc.txt 下载到某个具体的目录下
注意tftp是临时服务
转载于:https://blog.51cto.com/lovechocolate/1604509