PXE deploying CentOS7.6

Environment: Centos7.6
Host IP: 111.111.111.203
ISO image mount point: /media

1, install vsftpd service, and start the service;

yum install vsftpd -y

systemctl start vsftpd

PXE deployment CentOS7.6

2, install DHCP

yum install dhcp -y

PXE deployment CentOS7.6

3. Modify dhcp configuration
PXE deployment CentOS7.6
PXE deployment CentOS7.6

4. Install the tftp service,
check the storage path of’pxelinux’ in the tftp root directory, and start the xinetd service

yum install syslinux tftp tftp-server -y

PXE deployment CentOS7.6

PXE deployment CentOS7.6

PXE deployment CentOS7.6

PXE deployment CentOS7.6

5. Copy the pxelinux.0 file to the tftpboot directory and create the pxelinux.cfg directory at the same time
PXE deployment CentOS7.6

6. Copy all the contents of the isolinux directory of the ISO image to Under the current directory:
PXE deployment CentOS7.6

7, and then Copy the isolinux.cfg file in this directory to the default file in the pxelinuc.cfg directory
PXE deployment CentOS7.6
Note: The default file is newly added.
Open another virtual machine to test whether it works:
PXE deployment CentOS7.6
It is found that the system that has received the network push can be closed because the ISO image has not been copied to the distribution directory.

8. Copy the ISO image completely to the /var/ftp/rhel7.6 directory, here in order to distinguish the rhel7.6 directory created, and then copy the contents of the image into it

mkdir rhel7.6

cp -r /media/* /var/ftp/rhel7.6

9, install system-config-kickstart

yum install system -config-kickstart -y

Install the graphical interface, if you don’t install it, the following commands will report an error:

yum groupinstall “x Window System”

10. Use Command configuration kickstart
PXE deployment CentOS7.6
The graphical interface behind is to configure and install the linux system

PXE deployment CentOS7.6

PXE deployment CentOS7.6

After the setting is complete, save the ks.cfg file to In the /var/ftp directory,
edit this file, we need to divide the disk into volume groups, but no configuration scheme is found in the graphical interface, so add parameters to configure:

Disk partitioning information

part /boot –fstype=”xfs” –size=1024
part swap –size=2048
part pv.01 –size=1 –grow
volgroup vg_group pv.01
logvol / –vgname=vg_group –size=51200 –name=lv_root
PXE deployment CentOS7.6

11. Check whether this configuration file has syntax errors:

ksvalidator ks.cfg

PXE deployment CentOS7.6

Change the default option to the first one –> install For Centos 7.0 version system, change the location to read the image from the network to 111.111.111.203/rhel7.6
Edit the pxelinux.cfg/default file: line 63 is added, and the default is line 69. 65 behavior modified content

vi pxelinux.cfg/default

PXE deployment CentOS7.6

Restart related services:

systemctl restart tftp

systemctl restart vsftpd

systemctl restart dhcpd< /h1>

PXE deployment CentOS7.6

Then open the ones that need to be installed New machine test effect:

PXE deployment CentOS7.6

Leave a Comment

Your email address will not be published.