How can I quickly set up tftp on CentOS?

I got a note from Dave, asking how he could set up tftp quickly on CentOS (His happens to be 5.3, but this process should be pretty much the same on a handful of versions and distros), and get a quick configuration running.  So here you go, Dave; a tftp “cheat sheet”!

First, install the tftp server:
yum install tftp-server

Launch the gui services configuration tool:
system-config-services

…and click on the “On Demand Services” tab.  Look in the right side of the window, and make sure that it states that “xinetd.. is running“.  Scroll down and click the box for tftp.  Click “Save” at top.

Now, close out the gui tool, and run the following at the prompt:
/etc/init.d/xinetd restart

You might want to install the tftp client on your client machine for testing as well:
yum install tftp

Then, create a file on the server to test with.  For example:
echo "This is text." > /tftpboot/storedfile.txt
….which will quickly create the file in the default directory, with that line of text in it.

Then launch the client to test:
tftp localhost

…and get the file you created…
get storedfile.txt

…and you got it!

🙂

1 Comment

  1. bas

    xinetd runs tftp
    No firewall
    SELINUX disabled
    Timeout when testinng with localhost.

Leave a Comment

Your email address will not be published. Required fields are marked *