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.
- Install Xinetd: The TFTP server will run via xinetd so you need to make sure xinetd is installed using the bellow command.
- Enable TFTP and Xinetd: Use chkconfig to ensure that xinetd and tftp starts on reboot.
- 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.
- Example TFTP Command: The below is an example of use of the TFTP command.
[root@centos-server ~]#yum install tftp-server
[root@centos-server ~]#yum install xinetd
[root@centos-server ~]#chkconfig tftp on [root@centos-server ~]#chkconfig xinetd on
[root@centos-server ~]#chmod 777 /tftpboot
[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.
Related posts:
- TFTP: Error code 1: File not found You may get the below error code when attempting to...
- Possible Errors When Moving Nagios From One Linux Server To Another Linux Server I recently moved Nagios monitoring from one server to another...
- How to Verify a CentOS Linux Server is 32 Bit or 64 Bit To verify if a system is 32 bit versus 64...
- Linux CentOS 5 Server: YUM Repository to Install Zend Optimizer I recently needed to install Zend Optimizer which was required...
- Setup Log Rotation for Multiple Ruby on Rails Projects Using Linux logrotate Setting up log rotation for multiple Ruby on Rails projects...
Tags: CentOS, chkconfig, chmod, server, TFTP, tftpboot, xinetd, yum

























Entries (RSS)
Thanks,
I love doing quick Google searches for tasks I don’t do often (like setup tftp server under CentOS!!). Good work!
[Reply]
alex Reply:
March 10th, 2009 at 2:59 AM
Thanks! Glad to be able to help.
[Reply]
Alex,
Thank you very much for sharing.
Everything worked perfectly.
[Reply]
alex Reply:
November 11th, 2009 at 1:21 PM
Hello Vladimir,
No problem. Glad it helped out. Thanks for taking the time to leave feedback.
Thanks.
alex
[Reply]
one problem for me : an error message : transfer time out
[Reply]
alex Reply:
November 13th, 2009 at 12:13 PM
Hello Robert,
Thats like saying one problem for me… I try to start my car and it won’t… tell me how to fix it.
There are so many variables that it could be many different items. If you want the possibility of getting resolution to your TFTP problem then list as many specifics as you can. How have you set things up? What specifically are you doing (step by step with commands included) to receive that error?
If you provide more details I will do my best to help you out.
Thanks.
alex
[Reply]
I also have gotten the same error as Robert.
Basically, I followed the setup above on a CentOS box. Then when I run my tftp client (even using the command you give above in the final step) to connect to the CentOS box that I installed the server on (via your directions), I get the transfer timeout message.
I have ensured that the firewall is allowing port 69 connections, and even disabled the firewall all together. No love.
Any ideas?
[Reply]
alex Reply:
November 18th, 2009 at 3:46 PM
Hello AW,
Jim has some great tips in the below comments. Hope it helps.
Thanks.
alex
[Reply]
Most likely you have to edit your iptables or use the customize function in system-config-securitylevel to allow tftp through the firewall.
[Reply]
Jim Reply:
November 17th, 2009 at 3:29 PM
Err – that might have been of use to Robert (or a future note for myself when I search for this). For AW, you should try tail -f /var/log/messages when you try tftping to your server to see what happens. If nothing, try putting tftp client like atftp on your box and try to connect to localhost and upload/download something. If that doesn’t work, your tftp server is screwed; if it does work, it’s either firewall (which you said you disabled) or the client.
[Reply]
alex Reply:
November 18th, 2009 at 3:47 PM
Hello Jim,
Thanks for adding the extra info Jim! We always appreciate anyone helping others out or providing different ways to troubleshoot.
Thanks.
alex
[Reply]