1. We can install tftp using yum.
# yum -y install tftp-server
2. Check you have things installed:
user@machine:~ /usr/sbin/in.tftpd -V
tftp-hpa 0.42, with remap, with tcpwrappers
3. Create /etc/xinetd.d/tftp and put this entry:
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
4. Make /tftpboot directory
$ mkdir /tftpboot
$ chmod -R 777 /tftpboot
$ chown -R root.root /tftpboot
5. Start tftpd through xinetd
$ /etc/init.d/xinetd start
Verify Your TFTPD Installation
———————————————–
To verify your tftpd installation, create a file and use the tftp program to perform a file transfer:
1. Create a file that is readable by the user tftp. The file should be in the user tftp’s home directory or in a directory specified with the tftpd command. For example,
$ echo “Hello, this is a test.” > testfile
$ chown root.root testfile
2. Using a TFTP client, try to retrieve the file:
$ tftp localhost or tftp -v server_ip
tftp> get testfile
Received 24 bytes in 0.6 seconds
tftp> quit
You can specify either the IP address or name of the remote host. In order to get a file from a directory specified as an argument to the tftpd command, you must specify the full path name.
# tftp -v server_ip
tftp> put testfile
putting to server_ip:testfile [netascii]
Sent 28 bytes in 0.0 seconds [8819 bit/s]
tftp> get test
getting from server_ip:test to test [netascii]
tftp> quit