To use PXE Network Boot, you need a working DHCP server and TFTP server ([Prerequisites for Using PXE Network Boot]).
To install the TFTP server on the Linux distribution that supports {color:blue}yum{color}, such as Fedora and CentOS, run the following command:
{code}yum -y install tftp-server{code}
Other Linux distributions and Unix variants have their own methods of software installation. For example, on distributions that support aptitude, such as Debian and Ubuntu, a TFTP server can be installed with the command
{code}apt-get install tftpd-hpa{code}
After the installation, you will need to configure the TFTP server. This server runs from the super-server {color:blue}xinetd{color} and has a service configuration file in the {color:blue}/etc/xinetd.d{color} directory. The file in the {color:blue}/etc/xinetd.d{color} directory is usually installed with a TFTP server. But if the file in {color:blue}/etc/xinetd.d{color} is missing, you can create the file or record using your favorite text editor. An example of a file (named {color:blue}/etc/xinetd.d/tftp{color}) is provided below:
{quote}
{color:blue}service tftp{color}
{color:blue}socket_type = dgram{color}
{color:blue}protocol = udp{color}
{color:blue}wait = yes{color}
{color:blue}user = root{color}
{color:blue}server = /usr/sbin/in.tftpd{color}
{color:blue}server_args = \-s /tftpboot{color}
{color:red}disable = no{color}
{color:blue}per_source = 11{color}
{color:blue}cps = 100 2{color}
{color:blue}flags = IPv4{color}
{quote}
!pxe-tftp.png!
By default, the TFTP server is disabled and this line looks like {color:blue}disable = yes{color}. To enable it, change the line to {color:blue}disable = no{color} ({color:red}highlighted in red{color}). After saving the changes in the file, restart {color:blue}xinetd{color} with the following command:
{code}/etc/init.d/xinetd restart{code}
!pxe-tftp1.png!
To test the TFTP server, you can copy {color:blue}/bin/ls{color} (exists in every Linux) to the {color:blue}/tftpboot{color} directory. Using a computer with Linux, open shell and execute the following command:
{code}tftp <TFTP server IP address> -c get ls{code}
If the TFTP server works, the command will not return any output and the file {color:blue}ls{color} should appear in the current directory.
{info:title=Note}The TFTP client (tftp command) is not included in CentOS and Fedora by default. This can result in "{color:blue}tftp: command not found{color}" errors. If you see such an error, install the TFTP client with the command
{code}yum install tftp{code}
Or, on Ubuntu or Debian,
{code}apt-get install tftp-hpa{code}
{info}{excerpt:hidden=true}Instructions on how to configure TFTP server on Linux for PXE Network Boot Bare-Metal Restore method.{excerpt}
To install the TFTP server on the Linux distribution that supports {color:blue}yum{color}, such as Fedora and CentOS, run the following command:
{code}yum -y install tftp-server{code}
Other Linux distributions and Unix variants have their own methods of software installation. For example, on distributions that support aptitude, such as Debian and Ubuntu, a TFTP server can be installed with the command
{code}apt-get install tftpd-hpa{code}
After the installation, you will need to configure the TFTP server. This server runs from the super-server {color:blue}xinetd{color} and has a service configuration file in the {color:blue}/etc/xinetd.d{color} directory. The file in the {color:blue}/etc/xinetd.d{color} directory is usually installed with a TFTP server. But if the file in {color:blue}/etc/xinetd.d{color} is missing, you can create the file or record using your favorite text editor. An example of a file (named {color:blue}/etc/xinetd.d/tftp{color}) is provided below:
{quote}
{color:blue}service tftp{color}
{color:blue}socket_type = dgram{color}
{color:blue}protocol = udp{color}
{color:blue}wait = yes{color}
{color:blue}user = root{color}
{color:blue}server = /usr/sbin/in.tftpd{color}
{color:blue}server_args = \-s /tftpboot{color}
{color:red}disable = no{color}
{color:blue}per_source = 11{color}
{color:blue}cps = 100 2{color}
{color:blue}flags = IPv4{color}
{quote}
!pxe-tftp.png!
By default, the TFTP server is disabled and this line looks like {color:blue}disable = yes{color}. To enable it, change the line to {color:blue}disable = no{color} ({color:red}highlighted in red{color}). After saving the changes in the file, restart {color:blue}xinetd{color} with the following command:
{code}/etc/init.d/xinetd restart{code}
!pxe-tftp1.png!
To test the TFTP server, you can copy {color:blue}/bin/ls{color} (exists in every Linux) to the {color:blue}/tftpboot{color} directory. Using a computer with Linux, open shell and execute the following command:
{code}tftp <TFTP server IP address> -c get ls{code}
If the TFTP server works, the command will not return any output and the file {color:blue}ls{color} should appear in the current directory.
{info:title=Note}The TFTP client (tftp command) is not included in CentOS and Fedora by default. This can result in "{color:blue}tftp: command not found{color}" errors. If you see such an error, install the TFTP client with the command
{code}yum install tftp{code}
Or, on Ubuntu or Debian,
{code}apt-get install tftp-hpa{code}
{info}{excerpt:hidden=true}Instructions on how to configure TFTP server on Linux for PXE Network Boot Bare-Metal Restore method.{excerpt}