In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly talks about "the construction and use of tftp server under Ubuntu system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "the construction and use of tftp server under Ubuntu system"!
The simplest installation and configuration of tftp server
1. Install tftp-server
Sudo apt-get install tftpd-hpa
Sudo apt-get install tftp-hpa (you don't have to install the client if you don't need it)
Tftp-hpa is the client
Tftpd-hpa is the server side
two。 Configure the TFTP server
Sudo vim / etc/default/tftpd-hpa
Change the original content to:
TFTP_USERNAME= "tftp"
TFTP_ADDRESS= "0.0.0.0Vol 69"
TFTP_DIRECTORY= "tftp Root Directory" # server directory, you need to set the permission to 777PowerChomd 777
TFTP_OPTIONS= "- l-c-s"
3. Restart the TFTP service
Sudo service tftpd-hpa restart
4. Check whether the tftp service is enabled
Netstat-a | grep tftp
The display result is
Udp 0 0 *: tftp *: *
Indicates that the service has been turned on, which means that the tftp configuration is successful.
Parameter description:
-l is an abbreviation for local, followed by the name of the source file that exists in Client, or the file name that is renamed after downloading Client.
-r is the abbreviation of remote, followed by Server, the source file name in the root directory of the tftp server on PC, or the file name renamed after uploading Server.
-g is an acronym for get, used when downloading files
-p is an acronym for put, used when uploading files
Tftp occupies port 69 by default.
Based on the above parameters, the command format for tftp is as follows
1. Tftp-GPUP destination filename source filename server address
-GCPUP
Target file name
Source file name
Server address
Description
-g means download
-p means upload
Can be the same or different from the source file name
Add the parameter-l when downloading
Add the parameter-r when uploading
Cannot be renamed
Add the parameter-r when downloading
Add the parameter-l when uploading
As can be seen from the description of the above table
When downloading files from Server to Client, use the following command:
Tftp-g-l destination file name-r source file name server address
As ordered
Tftp-g-l B.txt-r A.txt 192.168.1.2
The function is to download the file A.txt to Client from the tftp root directory in server and rename it B.txt; if you don't change the name, B.txt will be changed to A.txt.
When uploading files from Clinet to Server, use the following command
Tftp-p-r destination file name-l source file name server address
As ordered
Tftp-p-r D.txt-l C.txt 192.168.1.2
The function is to upload the file C.txt from Client to the tftp root target of Server, and rename it to D.txt; if you don't change the name, D.txt will be changed to C.txt.
This command is generally used to change the file name after download or upload. If you do not change the file name, you can use the following simple command
2. Download or upload without changing the name
Download command without renaming:
Tftp-g-lUnigram source filename server address
(in this case, the parameter-l is equivalent to-r, and only one of them is used.)
Such as tftp-g-l A.txt 192.168.1.2 or tftp-g-r A.txt 192.168.1.2
The same effect means that Client downloads the file A.txt from Server and does not change its name.
Tftp-p-lUnigram source filename server address
(in this case, the parameter-l is equivalent to-r, and only one of them is used.)
Such as tftp-p-l B.txt 192.168.1.2 or tftp-p-r B.txt 192.168.1.2
The same function, all means to upload files from Client B.txt to Server, and do not change the name.
At this point, I believe you have a deeper understanding of "the construction and use of tftp servers under the Ubuntu system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.