The procedure for installing and configuring the tftp service in CentOS 5.3 is as follows:
1. Mount CDROM
[Root @ localhost mnt] # ls/dev/cdrom
/Dev/cdrom
[Root @ localhost mnt] # mount/dev/cdrom/mnt/cdrom/
2. Install xinetd
[Root @ localhost cdrom] # cd CentOS/
[Root @ localhost CentOS] # ls * inet *
Xinetd-2.3.14-10.el5.i386.rpm
[Root @ localhost CentOS] # rpm-ivh xinetd-2.3.14-10.el5.i386.rpm
3. Install tftp
[Root @ localhost CentOS] # ls * ftp *
Ftp-0.17-35.el5.i386.rpm tftp-0.42-3.1.el5.centos.i386.rpm
Gftp-2.0.18-3.2.2.i386.rpm tftp-server-0.42-3.1.el5.centos.i386.rpm
Lftp-3.5.1-2.fc6.i386.rpm vsftpd-2.0.5-12.el5.i386.rpm
[Root @ localhost CentOS] # rpm-ivh tftp-server-0.42-3.1.el5.centos.i386.rpm
[Root @ localhost CentOS] # rpm-ivh tftp-0.42-3.1.el5.centos.i386.rpm
4. Check whether the installation is complete.
[Root @ localhost CentOS] # rpm-qa | grep tftp
Tftp-server-0.42-3.1.el5.centos
Tftp-0.42-3.1.el5.centos
5. modify the configuration file
[Root @ localhost CentOS] # vim/etc/xinetd. d/tftp
# Default: off
# Description: The tftp server serves files using the trivial file transfer
# Protocol. The tftp protocol is often used to boot diskless
# Workstations, download configuration files to network-aware printers,
# And to start the installation process for some operating systems.
Service tftp
{
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/tftpboot
Disable = no
Per_source = 11
CPIs = 100 2
Flags = IPv4
}
6. Restart xinetd and configure tftp startup.
[Root @ localhost CentOS] # service xinetd restart
[Root @ localhost CentOS] # setup
Modify permissions:
[Root @ localhost/] # chmod 777/tftpboot/
Restart:
[Root @ localhost ~] # Service xinetd restart
7. Test
[Root @ localhost ~] # Cd/tftpboot/
[Root @ localhost tftpboot] # ls
A.txt ramdisk_sjx_0.7.3.gz
[Root @ localhost tftpboot] # vim a.txt
[Root @ localhost tftpboot] # cd
[Root @ localhost ~] # Tftp 10.10.143.103
Tftp> get a.txt
Tftp> q
[Root @ localhost ~] # Ls
A.txt install. log remove20090915 work
[Root @ localhost ~] # More a.txt
Aaaaaaaaaaaaaa
Successful!