How to install TFTP server on CentOS 7 / REHL 7
If you’re interested in the topic of the FTP protocol, you’ve probably come across the Trivial File Transfer Protocol (TFTP). The Trivial File Transfer Protocol (TFTP) is a UDP convention intended to permit clients to move file or documents. TFTP utilizes UDP port 69 for information move.
TFTP or the Trivial File Transfer Protocol is used by most of the popular download services on the Internet. Files can be transferred across a network or be copied to a file. A file is a data item in one place, and a file system is a set of rules for moving information from one place to another. If you think about it, this is pretty easy to understand. This means that the TFTP is the most commonly used method for transferring files over the network.
There are three major advantages of using TFTP for file transferring. One of these advantages is that the TFTP protocol is extremely simple and easy to understand. It does not matter if you are not a computer geek, then you can just transfer a file and start enjoying your work without having to bother about anything else. The other two advantages are that you can start transferring a file in seconds and also that transferring is incredibly fast. If you are a webmaster who wants to transfer large files, then the TFTP is ideal for you as it will allow you to do this in a very speedy manner.
You can also use the file transfer protocols for other purposes. You can upload your files on your own server, which can help you save a lot of money on bandwidth charges. There are numerous tools available to use in the TFTP protocol. This means that if you want to utilize your transferring as a part of your other projects, then you can easily be able to.
When you transfer a file using the TFTP, the data that you are transferring is sent as a chunk of data. This means that when you open up a program that is compatible with the TFTP, the program will automatically open the file you just transferred without any further fuss.
This tutorial explains how to install TFTP Server on CentOS7 or RHEL 7 server.
1. Install TFTP Server with TFTP client
#sudo yum install -y tftp-server tftp
2. Configure TFTP as a service
a. Copy service file in to systemd unit system file location
#cp /usr/lib/systemd/system/tftp.service /etc/systemd/system/tftp-server.service
#cp /usr/lib/systemd/system/tftp.socket /etc/systemd/system/tftp-server.socket
b. Now open the service file and change as follow
Requires=tftp.socket to Requires=tftp-server.socket
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot to ExecStart=/usr/sbin/in.tftpd -c -p -s /var/lib/tftpboot
Add new line
Run demo reload command
#sudo systemctl daemon-reload
Start TFTP service
#systemctl start tftp-server.service
#systemctl enable tftp-server.service
Allow TFTP ports on Firewall service
#sudo firewall-cmd –add-service=tftp –permanent
#sudo firewall-cmd –reload
3. Test TFTP server
Create test file in TFTP directory and append this line “This is file” and save in file.txt
Download or Get file using TFTP service
#echo "get file.txt" | tftp 127.0.0.1
#This is file