当前位置:网站首页>Construction and test of TFTP server under unbuntu (Debian)
Construction and test of TFTP server under unbuntu (Debian)
2022-07-03 09:29:00 【Monty Fried Bun】
According to some online tutorials , I tested the following , Can be transferred successfully
One 、 Download and install
Download and install tftp And daemons :
sudo apt-get install tftp-hpa tftpd-hpa xinetd
Two 、 establish tftp Folder
Generally, the root directory is created :
And change the permission so that everyone can access and modify
sudo mkdir tftpboot
sudo chmod 777 tftpboot
3、 ... and 、 Modify the configuration file
then , Entry directory /etc/xinetd.d/, And create a new file in it tftp, Add the specified content to tftp In file :
sudo vim /etc/xinetd.d/tftp
Add the following :
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 It's set up tftp Catalog .
Modify another configuration file :
vim /etc/default/tftpd-hpa
The content is :
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -l -c -s"
Four 、 restart tftp service
The order is as follows :
sudo /etc/init.d/xinetd reload
sudo /etc/init.d/xinetd restart
sudo /etc/init.d/tftpd-hpa restart
If the last restart fails , Refer to the following methods :
tfpd-hpa Solution to restart failure
5、 ... and 、TFTP Server testing
Get into tftp Under the folder , New file test
cd /tftp
vim test
You can enter custom content, such as :tftp test;
then , Open another terminal :
Enter the command :tftp 192.168.1.201
This ip It's your own server host ip;
Enter the command
get test
And then you see test Downloaded ;
6、 ... and 、tftp Common commands
Parameter description :
-l yes local Abbreviation , The heel exists in Client The source file name of , Or download Client after Renamed file name .
-r yes remote Abbreviation , Heel Server namely PC machine tftp The source text in the root directory of the server Piece name , Or upload Server The renamed file name .
-g yes get Abbreviation , When downloading files ,
-p yes put Abbreviation , Upload files with ,
tftp The default occupation is 69 port .
According to the above parameters ,tftp The command format of is as follows
1、 download
tftp –g –l B.txt –r A.txt 192.168.1.2
From server Medium tftp The root directory , Download the file A.txt To Client And changed its name to B.txt; If not renamed ,B.txt Just change it to A.txt.
tftp –g –r A.txt 192.168.1.2
Download directly without renaming
2、 Upload
tftp -p –r B.txt 192.168.1.2
From Client Upload files B.txt To Server, And do not rename ;
The upload and download above cannot be tested locally , You need to use the development board to test ;
Locally , Use tftp +ip
Reference resources ftfp command
tftp Server setup
边栏推荐
- LeetCode每日一题(2232. Minimize Result by Adding Parentheses to Expression)
- [untitled] use of cmake
- MySQL installation and configuration (command line version)
- Integrated use of interlij idea and sonarqube
- Flink-CDC实践(含实操步骤与截图)
- Go language - Reflection
- Solve POM in idea Comment top line problem in XML file
- 基于opencv实现桌面图标识别
- PolyWorks script development learning notes (I) - script development environment
- Bert install no package metadata was found for the 'sacraments' distribution
猜你喜欢
Hudi data management and storage overview
Learning C language from scratch -- installation and configuration of 01 MinGW
2022-2-14 learning xiangniuke project - generate verification code
Flink学习笔记(九)状态编程
CATIA automation object architecture - detailed explanation of application objects (III) systemservice
Win10安装ELK
小王叔叔的博客目录【持续更新中】
Flink学习笔记(八)多流转换
[kotlin learning] classes, objects and interfaces - define class inheritance structure
Go language - Reflection
随机推荐
Hudi quick experience (including detailed operation steps and screenshots)
Apply for domain name binding IP to open port 80 record
Hudi 数据管理和存储概述
LeetCode每日一题(985. Sum of Even Numbers After Queries)
【点云处理之论文狂读前沿版11】—— Unsupervised Point Cloud Pre-training via Occlusion Completion
Numerical analysis notes (I): equation root
图像修复方法研究综述----论文笔记
文件系统中的目录与切换操作
Usage of pandas to obtain MySQL data
LeetCode每日一题(2115. Find All Possible Recipes from Given Supplies)
PolyWorks script development learning notes (II) -treeview basic operations
Jestson Nano 从tftp服务器下载更新kernel和dtb
Jenkins learning (II) -- setting up Chinese
小王叔叔的博客目录【持续更新中】
[kotlin learning] control flow of higher-order functions -- lambda return statements and anonymous functions
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available. Prompt to upgrade pip
LeetCode每日一题(2212. Maximum Points in an Archery Competition)
[point cloud processing paper crazy reading cutting-edge version 12] - adaptive graph revolution for point cloud analysis
【Kotlin学习】类、对象和接口——定义类继承结构
Failed building wheel for argon2 cffi when installing Jupiter