The installation and configuration of Linux TFTP server are described in detail in this article. First, we will give a brief introduction to the content of the TFTP protocol, and then make a detailed analysis of the configuration content.
Introduction to the TFTP protocol
TFTP is a simple protocol for transferring files. It is implemented by UDP, but we cannot determine that some TFTP protocols are based on other transmission protocols. This protocol is designed to transfer small files. Therefore, it does not have many FTP functions. It can only obtain or write files from the file server, but cannot list directories, and does not perform authentication. It transfers 8-bit data. There are three transmission modes: netascii, which is an eight-bit ASCII code format and octet, which is an eight-bit source data type. The last mail is no longer supported, it directly returns the returned data to the user rather than saving it as a file.
Recently, we are engaged in embedded development. We need to use the TFTP protocol to burn embedded systems and programs to the board, so we have configured it in Magic Linux on PC.
Because I don't have the TFTP system service on Magic Linux, I have to install the related software package for configuration. However, for some operating systems, such as RedHat, which is inherent in the system, you can directly jump to step 1. The following describes how to install and configure a software package.
Linux TFTP Server installation and configuration 1. download the software package
You can go to the http://www.kernel.org/pub/software/network/tftp/ to download tftp-server-0.43-1.i386.rpmand tftp-hpa-0.48.tar.gz may have updated version) two packages, maybe the first rpm package can not, the second package contains the server and client, however, when compiling and installing the second package, I found that the TFTP service was not added to the system service settings. I didn't know why, and then I downloaded the first package, install it directly.
Installation and configuration of Linux TFTP Server 2. Installation of tftp-server-0.43-1.i386.rpm Server
[Root] # rpm-ivh -- nodeps tftp-server-0.43-1.i386.rpm, at this time, the root directory will have a tftpboot directory, is the share directory of tftp
Linux tftpserver installation and configuration 3.compile and install tftp-hpa-0.48.tar.gz
- [root]# tar vxfz tftp-hpa-0.48.tar.gz
-
- [root]# cd tftp-hpa-0.48
-
- [root]# make
-
- [root]# make install
The tftp client command can be used.
Linux TFTP Server installation and configuration 4. Run the setup command as a Super User and select the tftp service [*] tftp
Linux TFTP Server installation and configuration 5. Start the tftp Server
- [root]# service xinetd restart
Start [OK ].
Linux TFTP Server installation and configuration 6. Test tftp
1) enter the command on the terminal
- [root]# netstat -a | grep tftp
If there is related output, it indicates that the tftp configuration is successful.
2) You can put some files in tftpboot, use the tftp client command to connect to the server, and then use the GET command to download the file. If the download is successful, it will be done.
The configuration is complete.