In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Characteristics of tftp:
1) based on UDP
2) suitable for small file transfer
3) basic file acquisition and writing functions
To set up a server:
Install the software xinetd,tftp, tftpd
1) xinetd server daemon (the extended Internet services daemon). An upgraded version of inetd
2) tftp simple File transfer Protocol (Trivial File Transfer Protocol). A simplified version of ftp
3) tftpd tftp server (DARPA Trivial File Transfer Protocol server). DARPA: defense Advanced Research projects Agency
Syntax: apt-get install
Configure the server
1) create a new file named "tftp" with vi under the path: / etc/xinetd.d/
2) enter the following in the "tftp" file and save the exit (root permission is required)
* Note that the format is strict as shown in the figure, and "=" is aligned with the "tab" key.
Create a new directory "tftpboot" under the path: / var/, with the highest permission of 777. This directory is the home directory of the server [again: everything is a file! Servers are also files. ]
Note: the directory name and path depend on the parameter "server_args" in the configuration file
Restart the tftp server
/ etc/init.d/xinetd restart
The building is complete.
To test the server:
Under the tftp server directory (/ var/tftpboot), create a new file and enter something easy to identify. For example: test
Open another terminal (ctrl+alt+t) to access the server.
Input: tftp 127.0.0.1
* Why 127.0.0.1 instead of other IP? Try typing ifconfig in the terminal to view the network information. In addition to the network card eth0, there is also a virtual network card for lo, type local loopback (local loopback interface (or address)), address: 127.0.0.1. As for what is the local loopback address, it is also a mess, see Baidu for details.
Request the server to get the newly created file test (you need to operate at the tftp prompt)
Get test
[if you are logged in as an ordinary user and cannot use the get command in a higher-level directory, you will be prompted that the permissions are not sufficient. So, the path to testing get is done under / home/topeet. Topeet is user name]
After success, enter Q to exit the tftp console.
Ls in the current directory and open the test file with vim to make sure it is used for testing.
To test the server on the development board:
Set the network configuration related to the virtual machine, so that the IP address of the development board is in the same network segment as the IP address of the virtual machine and can ping. (I set the virtual machine network to bridge here)
* the network adapter file on the development board is located in / etc/eth0-setting, and the IP address is opened and modified through vi.
Enter "tftp-g-l testlocal-r test 192.168.15.134" on the hyperterminal of the development board
The meaning of the command is as follows:
Tftp: transfer command
-g: get get (write to put)
-l: local local
Testlocal: the file name stored locally
-r: remote remote
Test: file name on the remote server directory (/ var/tftpboot)
192.168.15.134: server IP address]
Note: the input order of-g-l is required, and the terminal will prompt a syntax error when it is replaced by-l-g.
When you are finished, the file testlocal is generated in the current directory. During the actual operation, it is found that the host file permissions have changed during the transfer:
The following figure shows the permissions of the file exectest on the host:-rwxr-xr-x
But when it comes to the terminal, the permission of the file becomes:-rw-r--r--
By comparison, it can be found that all levels of operation permissions have been reset, that is, inoperable. Is this a design for system security?
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.