May 24, 2021 That's what Linux should learn
The Simple File Transfer Protocol (Trivial File Transfer Protocol, TFTP) is a protocol based on the UDP protocol for simple file transfer between the client and the server. As the name implies, it provides a file transfer service that is not complex and expensive (which can be used as a simplified version of the FTP protocol).
TFTP's command function is not as powerful as the FTP service, can not even traverse the directory, in terms of security is also weaker than the FTP service. M oreover, because TFTP uses the UDP protocol when transferring files and occupies a port number of 69, the file transfer process is not as reliable as the FTP protocol. However, because TFTP does not require client permission authentication, it reduces unnecessary system and network bandwidth consumption, making it more efficient to transfer small trivial files.
Next, install the TFTP package on the system and experience it.
Install 2 Packages (+1 Dependent package)
Total download size: 207 k
Installed size: 373 k
Is this ok [y/d/N]: y
Downloading packages:
………………省略部分输出信息………………
Installed:
tftp.x86_64 0:5.2-11.el7 tftp-server.x86_64 0:5.2-11.el7
Dependency Installed:
xinetd.x86_64 2:2.3.15-12.el7
Complete!
In the RHEL 7 system, the TFTP service is managed using the xinetd service program. X inetd services can be used to manage a variety of lightweight network services and have powerful log capabilities. Simply put, after installing the TFTP package, you also need to turn it on in the xinetd service program and modify the default disable parameter to no:
(root@linuxprobe.) vim /etc/xinetd.d/tftp service tftp s/socket_type dgram protocol s udp wait s yes user s root server s /usr/sbin/in.tftpd server_args s /var /lib/tftpboot disable s no per_source s 11 cps s 100 2 flags s IPv4 s then restart the xinetd service and add it to the system's boot startup item to ensure that the TFTP service is still running after the system restarts. Considering that some systems' firewalls do not have 69 ports that allow the UDP protocol by default, you need to manually add that port number to the firewall's allow policy:
root@linuxprobe the root directory of the root@linuxprobe root@linuxprobe root@linuxprobe/lib/tftpboot. W e can use the newly installed tftp command to try to access the files in it and experience the file transfer process of the TFTP service for our own experience. The parameters in Table 11-5 may be used when accessing files using the tftp command.
The parameters and effects available in the Table 11-5 tftp command
Command Role ? H elp information put upload file get download file verbose display detailed processing information status display current status information binary use binary transfer ascii using ASCII code to transfer timeout timeout quit exit root@linuxprobe . /var/lib/tftpboot/readme.txt.txt . . . root@linuxprobe . Quit (root@linuxprobe) ls anaconda-ks.cfg Documents initial-setup-ks.cfg Pictures readme.txt Videos D esktop Downloads Music Public Templates (root@linuxprobe) cat readme.txt i love linux Of course, TFTP services play more than that, and Chapter 19 will match TFTP services with other software to create a complete automated deployment system solution. Everybody keep refueling!