Two. PXE configuration
1. Install and enable the TFTP service
Yum-y Install tftp* (in fact, the need is TFTP tftp-server these two components, but for convenience ~)
Vi/etc/xinetd.d/tftp
Modify Disable =no
Wq Save
Service xinetd Start
2. Install and enable the DHCP service
Hint (server ip:192.168.10.125; DHCP address pool is 192.168.10.135-192.168.10.145;)
Yum-y Install DHCP
Vi/etc/dhcp/dhcpd.conf
Subnet 192.168.10.0 netmask 255.255.255.0 {
Option routers 192.168.10.125;
Option Subnet-mask 255.255.255.0;
Option Domain-name "benet.com";
Option Domain-name-servers 192.168.10.125,202.106.0.20;
Default-lease-time 21600;
Max-lease-time 43200;
Range 192.168.10.35 192.168.10.145;
Next-server 192.168.10.125; Specify the address of the TFTP server
FileName "pxelinux.0"; Specify the file name of the PXE boot program
}
Wq Save
Service DHCPD Start
3. Prepare the PXE boot program, boot menu file
Yum-y Isntall Syslinux
cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/
[Prepare RHEL6 installation Source]
Mkdir-p/var/ftp/rhel6
cp-rf/media/*/var/ftp/rhel6/
Service VSFTPD Start
Mkdir/var/lib/tftpboot/pxelinux.cfg
Cp/ftp/media/isolinux/isolinux.cfg/tftpboot/pxelinux.cfg/default
Vi/tftpboot/pxelinux.cfg/default
Default Auto
Prompt 1
Label Auto
Kernel Vmlinuz
Append initrd=initrd.img devfs=nomount ramdisk_size=8192
Label Linux text
Kernel Vmlinuz
Append text initrd=initrd.img devfs=nomount ramdisk_size=8192
Label Linux Rescue
Kernel Vmlinuz
Append rescue initrd=initrd.img Devfs=nomount ramdisk_size=8192
Wq Save
4. Prepare the Linux kernel, initialize the image file
cd/media/images/pxeboot/
CP Vmlinuz initrd.img/var/lib/tftpboot/
RHCE-PXE Unattended Installation Two