First, we need to use the Linux desktop mode. If there is no desktop mode, please install it consciously.
Required support environment, DHCP, TFTP, and vsftp.
1. Create an FTP shared CD directory first
mkdir -p /var/ftp/centos6
2. Copy the CD to the directory.
cp -rp /media/cdrom/* /var/ftp/centos6
3. Install TFTP-Server
yum -y install tftp-server
4. Modify the TFTP configuration file.
vim /etc/xinetd.d/tftp
Others remain unchanged
Open the xinetd service
/etc/init.d/xinetd start
Change it to start
chkconfig tftp on
5. Prepare the kernel distribution file.
cp /var/ftp/centos6/isolinux/vmlinuz initrd.img /var/lib/tftpboot/
We also need to install syslinux
yum -y install syslinux
Copy another kernel file after installation.
cp /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/
Another one should be admitted to the CD source.
cp /var/ftp/centos6/isolinux/isolinux.cfg /var/lib/tftpboot/
In this way, the kernel is ready to distribute files, a total of four
Then we need to downgrade and modify something.
chmod 644 /var/lib/tftpboot/isolinux.cfg
vim /var/lib/tftpboot/isolinux.cfg
Change the file to the image.
Comment out all menu headers.
Let me throw this file to the/var/lib/tftpboot/pxelinux. cfg directory and rename it default.
cd /var/lib/tftpboot/mkdir pxelinux.cfgmv isolinux.cfg pxelinux.cfg/defaul
Then we install DHCP and modify the configuration file.
Yum-y install dhcpvim/etc/DHCP/DHCPD. conf
Copy the Template
CP/usr/share/doc/DHCP */DHCPD. conf. Sample/etc/DHCP
Import
CAT/etc/DHCP/DHCPD. conf. Sample>/etc/DHCP/DHCPD. conf
Change to the following
Note that all the changes end with a block number. If there is no block number, it is wrong.
Start the service,
Download vsftpd and start it.
yun -y install vsftpd/etc/init.d/vsftpd start
Install system-config-kickstart
yum -y install system-config-kickstart
On the desktop.
Restart the three services.
Copy the KS configuration script to FTP.
[[email protected] ~]# cp ks.cfg /var/ftp/[[email protected] ~]# chmod 777 /var/ftp/ks.cfg
Modify boot file
vim /var/lib/tftpboot/pxelinux.cfg/default
Add a sentence inside
In the self-installed configuration script, modify it to all automatically installed
Automatic PXE Installation