Enable TFTP server

Permanently deleted user -

This article covers the following operating systems:

  • RHEL (Red Hat Enterprise Linux) 5.3
  • RHEL 6.2
  • MacOS

RHEL 5.3

RHEL 5.3 based MDCs (Meda Data Controllers)

(from RHEL 5 documentation)

The TFTP config file should already be configured as follows (disables = no, server_args = <path>):

[root@sbf ~]# vim /etc/xinetd.d/tftp

#
# File /etc/xinetd.d/tftp
#
service tftp
{
...
...
       server_args             = -s /tftpboot
       disable                 = no
}

You must then restart xinetd for the new configuration to take effect:

[root@sbf ~]# chkconfig tftp on
[root@sbf ~]# service xinetd restart

To check if it is functioning (listening on the default port) use netstat:

[root@sbf ~]# netstat -nulp | grep 69
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               22418/xinetd        
udp        0      0 0.0.0.0:69                  0.0.0.0:*                               22379/in.tftpd

To turn it back off:

[root@sbf ~]# chkconfig tftp off
[root@sbf ~]# service xinetd restart

To get files from the server using command line (Mac/Linux):

[user@client ~]$ tftp 10.0.0.2
tftp> get testFile.txt

 

RHEL 6.2

Notes for RHEL 6.x:

After installing the rpm the TFTP config file needs to be updated to enable the tftp.

The default path is /var/lib/tftpboot.

# rpm -ivh tftp-server-5.2-1.el6.rfx.x86_64.rpm

 

# vim /etc/xinetd.d/tftp
 disable = no

 

MacOS

TftpServer is a utility which helps you to utilize and configure the TFTP server shipped with the standard Mac OSX distribution.

http://www.macupdate.com/app/mac/11116/tftpserver

Or use the native tftp server via CLI.

To start the tftp server on OS X 10.7 Lion:

sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd

The default tftp file path is /private/tftpboot but you can change that by editing /System/Library/LaunchDaemons/tftp.plist and re-starting with launchctl...

sudo launchctl restart com.apple.tftpd

 

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.