May 24, 2021 That's what Linux should learn
The DHCP service program is used to assign available IP addresses to client hosts, and this is the basis for file transfer between the server and client hosts, so we configure the DHCP service program first. First set the IP address for the unattended system according to Table 19-1, and then follow Figures 19-2 and 19-3 to shut down their DHCP services in the virtual network editor of the virtual machine.
Table 19-1 Unattended system with client settings
Host Name Operating System IP Address Unattended System RHEL 7 192.168.10.10 Client Uninstalled Operating System - Chapter 19 Installs service using PXE-Kickstart Unattended. Chapter 19 Installs the service unattended using PXE-Kickstart.
Figure 19-2 Turns on the virtual network editor of the virtual machine
Figure 19-3 Shut down the DHCP service that come with the virtual machine
Once the disc image is mounted and the Yum repository file is configured properly, the DHCP service package can be installed.
Package Arch Version Repository Size
================================================================================
Installing:
dhcp x86_64 12:4.2.5-27.el7 rhel 506 k
Transaction Summary
================================================================================
Install 1 Package
Total download size: 506 k
Installed size: 1.4 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 12:dhcp-4.2.5-27.el7.x86_64 1/1
Verifying : 12:dhcp-4.2.5-27.el7.x86_64 1/1
Installed:
dhcp.x86_64 12:4.2.5-27.el7
Complete!
Chapter 14 has explained in detail the configuration and deployment methods of the DHCP service program, and I believe readers have some impressions of the relevant configuration parameters. However, the profile we are using here is two main differences from the profile in Chapter 14: the BOOT boot protocol is allowed to allow hosts in the LAN that do not have an operating system to obtain a static IP address;
[root@linuxprobe ~]# vim /etc/dhcp/dhcpd.conf allow booting; a llow bootp; d dns-update-style interim; i gnore client-updates; s ubnet 192.168.10.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; o ption domain-name-servers 192.168.10.10; r ange dynamic-bootp 192.168.10.100 192.168.10.200; d efault-lease-time 21600; m ax-lease-time 43200; n ext-server 192.168.10.10; f ilename "pxelinux.0"; A fter confirming that the parameters of the DHCP service program are filled in correctly, restart the service program and add it to the boot item. This automatically installs the system for the client host after the device's next restart without human intervention.
[root@linuxprobe ~]# systemctl restart dhcpd [root@linuxprobe ~]# systemctl enable dhcpd ln -s '/usr/lib/systemd/system/dhcpd.service' '/etc/systemd/system/multi-user.target.wants/dhcpd.service'