1、TFTP协议简介
TFTP,全称是 Trivial File Transfer Protocol(简单文件传输协议),基于 UDP 实现,该协议简单到只能从远程服务器读取数据或向远程服务器上传数据。

2、TFTP实战
  1>环境准备:centos7

192.168.100.101     tftp-server
192.168.100.20 tftp-client

server端和client端分别关闭防火墙,禁用selinux
# systemctl disable firewall;systemctl stop firewall
修改/etc/sysconfig/selinux,将SELINUX设定为disable,使用命令setenforce 0让selinux配置文件生效

  2>linux服务端 tftp-server 配置
  安装tftp服务器,需要安装xinetd(守护tftp)、tftp和tftp-server 3个软件

[root@tftp-server ~]# yum install xinetd tftp tftp-server -y
[root@tftp-server ~]# rpm -ql tftp-server
/etc/xinetd.d/tftp
/usr/lib/systemd/system/tftp.service
/usr/lib/systemd/system/tftp.socket
/usr/sbin/in.tftpd
/usr/share/doc/tftp-server-5.2
/usr/share/doc/tftp-server-5.2/CHANGES
/usr/share/doc/tftp-server-5.2/README
/usr/share/doc/tftp-server-5.2/README.security
/usr/share/man/man8/in.tftpd..gz
/usr/share/man/man8/tftpd..gz
/var/lib/tftpboot #/var/lib/tftpboot为存放数据的文件,也就是说从服务器端下载文件必须放于此目录下

  修改/etc/xinetd.d/tftp文件,将其中的disable=yes改为disable=no。开启TFTP服务,启动服务。

  3>启动tftp服务器,并查看是否开启

[root@tftp-server ~]# systemctl enable xinetd;systemctl start xinetd
[root@tftp-server ~]# netstat -a | grep tftp
udp 0.0.0.0:tftp 0.0.0.0:*

  4>在tftp服务器目录,创建测试文件

[root@tftp-server ~]# echo hello > /var/lib/tftpboot/test

  5>客户端安装tftp包,使用tftp工具从远程服务器下载文件

[root@tftp-client ~]# yum install tftp -y
[root@tftp-client ~]# tftp 192.168.100.101
tftp> get test
tftp> q
[root@tftp-client ~]# ls
anaconda-ks.cfg test
[root@tftp-client ~]# cat test
hello

  6>tftp命令用法如下

tftp your-ip-address

进入TFTP操作:
connect:连接到远程tftp服务器
mode:文件传输模式
put:上传文件
get:下载文件
quit:退出
verbose:显示详细的处理信息
tarce:显示包路径
status:显示当前状态信息
binary:二进制传输模式
ascii:ascii传送模式
rexmt:设置包传输的超时时间
timeout:设置重传的超时时间
help:帮助信息
?:帮助信息

linux-TFTP服务的更多相关文章

  1. linux tftp 服务

    TFTP(Trivial File Transfer Protocol)是基于UDP协议开发,用来在客户机与server之间进行简单文件传输的协议,提供不复杂.开销不大的文件传输服务. 一.改动/et ...

  2. Linux下TFTP服务的安装、配置和操作

      TFTP是用来下载远程文件的最简单网络协议,它其于UDP协议而实现.嵌入式linux的tftp开发环境包括两个方面:一是linux服务器端的tftp-server支持,二是嵌入式目标系统的tftp ...

  3. linux查看tftp服务是否启动

    netstat -a |grep tftp 若输出以下信息说明tftp服务已启动: udp  0 0 *:tftp *:*

  4. linux搭建TFTP服务

    1.安装tftp服务和客户端 sudo apt-get install xinetd tftp tftpd 2.配置 vim /etc/xinetd.d/tftp 内容如下: service tftp ...

  5. Ubuntu安装配置TFTP服务

    tftpd-hpa 是一个功能增强的TFTP服务器.它提供了很多TFTP的增强功能,它已经被移植到大多数的现代UNIX系统. 1.安装 sudo apt-get install tftpd-hpa t ...

  6. ubuntu10.04 安装配置tftp服务

    tftpd-hpa 是一个功能增强的TFTP服务器.它提供了很多TFTP的增强功能,它已经被移植到大多数的现代UNIX系统. 1.安装 sudo apt-get install tftpd-hpa t ...

  7. tftp服务、串口工具minicom

    linux下安装tftp服务 参考这位仁兄的经验 确实百度上很多关于配置tftp服务的方法,但是这篇文章的介绍真的是很精简,对于一个刚接触纯linux环境的小白来说是很舒服的一件事. 首先是安装tft ...

  8. CentOS 6.5自动化运维之基于DHCP和TFTP服务的PXE自动化安装centos操作系统详解

    前言    如果要给很多台客户端主机安装操作系统,要是每一台都拿张安装光盘一台一台主机的去装系统那就太浪费时间和精力了.在生产环境中也不实际,要实现为多台主机自动安装操作系统,那我们怎么实现自动化安装 ...

  9. 玩转Windows/Linux tftp命令

    tftp很好理解, 主要用来传文件, 下面以我的操作来谈谈tftp中最重要的几个命令. 一. Windows上的sftp命令(据说Linux上也是这样, 当然此处是指非嵌入式的Linux) 步骤: a ...

  10. Ubuntu TFTP 服务

    /******************************************************************** * Ubuntu TFTP 服务 * 说明: * 在Ubun ...

随机推荐

  1. Codeforces Round #200 (Div. 1)D. Water Tree

    简单的树链剖分+线段树 #include<bits\stdc++.h> using namespace std; #define pb push_back #define lson roo ...

  2. 零基础学习Web前端开发

    目录 技术背景 开发环境 学习过程 参考资料 结束语 技术背景 什么是前端开发? 前端开发是创建Web页面或App等将界面呈现给用户的过程.通过使用 HTML,CSS,JavaScript,以及它们衍 ...

  3. maven项目部署到tomcat中没有classe文件的问题汇总

    1.修改生成的class文件的位置

  4. [LC] 442. Find All Duplicates in an Array

    Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others ...

  5. [LC] 362. Design Hit Counter

    Design a hit counter which counts the number of hits received in the past 5 minutes. Each function a ...

  6. 响应式WEB页面开发实践

    转自:https://github.com/markyun/My-blog/issues/27 最近得到一个新任务单,让我用一套页面适应所有主流终端(Android.iPhone.iPad.PC),而 ...

  7. the extent of|fill in|find itimpossible to|something|the other day|Be man enough to do sth/for sth|cure sb of |draw out| gone over|made for | see someone off,|

    area or length; amount 面积,范围:长度:数量 We don't yet know the extent of his injuries (= how bad his injur ...

  8. openssl编译时!遇见的问题

    openssl编译: 1.编译静态库 ./config --prefix=/root/openssl/soft make 2.编译动态库 ./config --prefix=/root/openssl ...

  9. 编辑距离算法-DP问题

    Levenshtein Distance The Levenshtein distance is a string metric for measuring the difference betwee ...

  10. webgrind安装使用详细说明

    webgrind是一个网页版的性能分析工具,它的主要作用就是分析xdebug生成的cachegrind文件,以一种界面友好详尽的方式来展示性能数据.试用了一下感觉还是很不错的,鉴于网上并没有一个系统介 ...