当前位置:网站首页>unbuntu(debian)下TFTP服务器搭建及测试
unbuntu(debian)下TFTP服务器搭建及测试
2022-07-03 09:03:00 【蒙蒂锅巴】
根据一些网上的教程,自己测试了以下,可以成功传输
一、下载安装
下载安装tftp以及守护进程:
sudo apt-get install tftp-hpa tftpd-hpa xinetd
二、建立tftp文件夹
一般都是建立根目录下:
并更改权限为所有人都可以访问修改
sudo mkdir tftpboot
sudo chmod 777 tftpboot
三、修改配置文件
然后,进入目录 /etc/xinetd.d/,并在其中新建文件 tftp,把指定的内容加入到 tftp 文件中:
sudo vim /etc/xinetd.d/tftp
添加内容如下:
service tftp
{
disable = no 138
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
}
server_args 就是设置的tftp目录。
修改另外一个配置文件:
vim /etc/default/tftpd-hpa
内容为:
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -l -c -s"
四、 重启tftp服务
命令如下:
sudo /etc/init.d/xinetd reload
sudo /etc/init.d/xinetd restart
sudo /etc/init.d/tftpd-hpa restart
若最后一步重启失败,参考以下方法:
tfpd-hpa重启失败解决方法
五、TFTP服务器测试
进入tftp文件夹下,新建文件test
cd /tftp
vim test
可以输入自定义内容例如:tftp test;
然后,另外打开一个终端:
输入命令:tftp 192.168.1.201
这个ip是你自己服务器主机的ip;
输入命令
get test
然后就看到test被下载下来了;
六、tftp常用命令
参数说明:
-l 是local的缩写,后跟存在于Client的源文件名,或下载Client后 重命名的文件名。
-r 是remote的缩写,后跟Server即PC机tftp服务器根目录中的源文 件名,或上传Server后重命名后的文件名。
-g 是get的缩写,下载文件时用,
-p 是put的缩写,上传文件时用,
tftp 默认占用的是69端口。
根据上述参数,tftp的命令格式如下
1、 下载
tftp –g –l B.txt –r A.txt 192.168.1.2
作用是从server中的tftp根目录下,下载文件A.txt到Client并更名为B.txt;若不更名,B.txt就改为A.txt.
tftp –g –r A.txt 192.168.1.2
不更名直接下载
2、上传
tftp -p –r B.txt 192.168.1.2
表示从Client上传文件B.txt到Server,且不更名;
上面的上传和下载不能在本地测试,需要使用开发板测试;
本地的话,使用tftp +ip
边栏推荐
- 1922. Count Good Numbers
- [kotlin learning] operator overloading and other conventions -- overloading the conventions of arithmetic operators, comparison operators, sets and intervals
- Logstash+jdbc data synchronization +head display problems
- Spark 概述
- Word segmentation in full-text indexing
- Overview of database system
- Construction of simple database learning environment
- The server denied password root remote connection access
- Banner - Summary of closed group meeting
- [point cloud processing paper crazy reading classic version 13] - adaptive graph revolutionary neural networks
猜你喜欢

Using Hudi in idea
![[point cloud processing paper crazy reading classic version 13] - adaptive graph revolutionary neural networks](/img/61/aa8d0067868ce9e28cadf5369cd65e.png)
[point cloud processing paper crazy reading classic version 13] - adaptive graph revolutionary neural networks

There is no open in default browser option in the right click of the vscade editor
![[point cloud processing paper crazy reading classic version 8] - o-cnn: octree based revolutionary neural networks for 3D shape analysis](/img/fa/36d28b754a9f380bfd86d4562268c3.png)
[point cloud processing paper crazy reading classic version 8] - o-cnn: octree based revolutionary neural networks for 3D shape analysis
![[point cloud processing paper crazy reading frontier version 8] - pointview gcn: 3D shape classification with multi view point clouds](/img/ee/3286e76797a75c0f999c728fd2b555.png)
[point cloud processing paper crazy reading frontier version 8] - pointview gcn: 3D shape classification with multi view point clouds

Crawler career from scratch (IV): climb the bullet curtain of station B through API

Go language - Reflection

Save the drama shortage, programmers' favorite high-score American drama TOP10

Temper cattle ranking problem

Vs2019 configuration opencv3 detailed graphic tutorial and implementation of test code
随机推荐
Hudi quick experience (including detailed operation steps and screenshots)
ERROR: certificate common name “*.” doesn’t match requested ho
WARNING: You are using pip ; however. Later, upgrade PIP failed, modulenotfounderror: no module named 'pip‘
[point cloud processing paper crazy reading classic version 13] - adaptive graph revolutionary neural networks
2022-2-14 learning the imitation Niuke project - send email
Modify idea code
[point cloud processing paper crazy reading frontier edition 13] - gapnet: graph attention based point neural network for exploring local feature
Construction of simple database learning environment
Save the drama shortage, programmers' favorite high-score American drama TOP10
【点云处理之论文狂读前沿版12】—— Adaptive Graph Convolution for Point Cloud Analysis
Run flash demo on ECS
[set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
[kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
Detailed steps of windows installation redis
Crawler career from scratch (3): crawl the photos of my little sister ③ (the website has been disabled)
Hudi 快速体验使用(含操作详细步骤及截图)
Vscode编辑器右键没有Open In Default Browser选项
Matlab dichotomy to find the optimal solution
Hudi学习笔记(三) 核心概念剖析
【点云处理之论文狂读经典版7】—— Dynamic Edge-Conditioned Filters in Convolutional Neural Networks on Graphs