3. Install and configure TFTP
After a PXE client gets its IP and subnet information from the DHCP
server, it will move forward and contact next-server
via TFTP. In
our case this server will again be our master node, which has the IP
192.168.16.1
in that subnet. Now we need to create the necessary
TFTP server to host kernel and initial ram disks which are then booted
from.
Install the TFTP server and client
[root@master ~]# yum install tftp-server tftp
Enable the daemon
[root@master ~]# systemctl enable tftp [root@master ~]# systemctl status tftp
TFTP server will be started when a socket is created with port 69. You can try this by connecting to it locally.
[root@master ~]# tftp localhost
tftp> get test
Error code 1: File not found
You will see that the daemon has started by itself.
[root@master ~]# systemctl status tftp
● tftp.service - Tftp Server
Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
Active: active (running) since Mon 2019-02-11 15:11:58 EST; 2s ago
Docs: man:in.tftpd
Main PID: 11652 (in.tftpd)
CGroup: /system.slice/tftp.service
└─11652 /usr/sbin/in.tftpd -s /var/lib/tftpboot
Feb 11 15:11:58 master systemd[1]: Started Tftp Server.
Note
Activating daemons with sockets is a systemd feature. Previously, a common
way of setting up tftp
was running the server as a child of the xinetd
service. This required enabling the tftp server in /etc/xinetd.d/tftp
,
installing, enabling and starting xinetd
.