The below steps will allow you to set up a TFTP server on Linux but specifically on a CentOS server. All you need to do is install a couple files with yum, enable the server, and restart xinetd.
- Install TFTP Server: Use the below syntax to install the TFTP server on CentOS.
- [root@centos-server ~]#yum install tftp-server
- Install Xinetd: The TFTP server will run via xinetd so you need to make sure xinetd is installed using the bellow command.
- [root@centos-server ~]#yum install xinetd
- Enable TFTP and Xinetd: Use chkconfig to ensure that xinetd and tftp starts on reboot.
- [root@centos-server ~]#chkconfig tftp on
- [root@centos-server ~]#chkconfig xinetd on
- Modify TFTPBOOT Permissions: Use the below syntax to modify the permissions of the /tftpboot directory to allow tftp transfers to and from this directory. The /tftpboot directory is the default directory where files are transfered to and from using TFTP.
- [root@centos-server ~]#chmod 777 /tftpboot
- Example TFTP Command: The below is an example of use of the TFTP command.
- [root@centos-server ~]#tftp -v 192.168.1.100 -c put file-example.txt
The normal computer user is probably not going to find TFTP very useful but techies will be able to find many uses. Typically technical people will run across TFTP when upgrading the firmware on some sort of network device. Please post comments if you have any TFTP questions.