Less nonsense, only to open dry;
First, install DHCP, tftp-server, httpd, Syslinux, System-config-kickstart, desktop environment. Where Syslinux is to generate pxelinux.0 files; system-config-kickstart Configure ks.cfg file tool
1, # yum-y install DHCP tftp-server httpd syslinux System-config-kickstart
2. Configure DHCP
# cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf
# vim/etc/dhcp/dhcpd.conf
#全局配置:
Ddns-update-style Interim;
Ignore client-updates;
Default-lease-time 86400;
Max-lease-time 86400;
#子网作用域:
Subnet 192.168.1.0 netmask 255.255.255.0 {
Range DYNAMIC-BOOTP 192.168.1.22 192.168.1.30;
Option routers 192.168.1.1;
Option Subnet-mask 255.255.255.0;
Allow booting;
Allow BOOTP;
FileName "pxelinux.0";
Next-server 192.168.1.200;
}
#保留地址:
#host Passacaglia {
#}
3. Configuring TFTP
# vim/etc/xinetd.d/tftp
Service TFTP
{
Socket_type = Dgram
protocol = UDP
Wait = yes
user = root
Server =/USR/SBIN/IN.TFTPD
Server_args =-s/var/lib/tftpboot
disable = no
Per_source = 11
CPS = 100 2
Flags = IPV4
}
4, HTTP configuration, the default installation is complete. Just create a directory that holds the ISO
# MKDIR-PV/VAR/WWW/HTML/CENTOS6
Ii. preparation of boot files and system images
1, prepare the system ISO, you can copy all the files under the installation CD to/var/www/html/centos6/, or only attach the CD-ROM. This article uses only mount mode:
# mount/dev/sr0/var/www/html/centos6/
2. Prepare the required files for PXE boot:
# cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/\\pxelinux.0 A powerful network boot program, copied to the TFTP home directory
# cp/var/www/html/centos6/images/pxeboot/{vmlinuz,initrd.img}/var/lib/tftp/boot/\ \ Copy CD in kernel, Remdisk file
# CP /var/www/html/centos6/isolinux/{boot.msg,vesamenu.c32,splash.jpg}/var/lib/tftpboot/\ \ Copy boot menu and other files
# mkdir-pv/var/lib/tftpboot/pxelinux.cfg \ \ Create a directory where the menu configuration file is stored
# CP /var/www/html/centos6/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default \ \ Copy menu configuration file and renamed
Note: The above is noted that the CD-ROM images is the directory to store the kernel, Isolinux is the system files required to store the system boot. Pxelinux.0 is obtained through the installation package.
3. Edit the Boot menu profile default: Simple modification
# vim /var/lib/tftpboot/pxelinux.cfg/default
default VESA\ \ Select the Installation tab
#prompt 1 \ \ Shows boot:
Timeout 3600\ \ Timeout Time
Display Boot.msg
Menu Background Splash.jpg
Menu title Welcome to CentOS 6.8!
Menu Color Border 0 #ffffffff #00000000
Menu Color SEL 7 #ffffffff #ff000000
Menu Color Title 0 #ffffffff #00000000
Menu Color tabmsg 0 #ffffffff #00000000
Menu Color Unsel 0 #ffffffff #00000000
Menu Color Hotsel 0 #ff000000 #ffffffff
Menu Color Hotkey 7 #ffffffff #ff000000
Menu Color ScrollBar 0 #ffffffff #00000000
Label Linux
Menu label ^install or upgrade an existing system
Menu default
Kernel Vmlinuz
Append initrd=initrd.img
Label VESA
Menu Label Install system with ^basic video driver
Kernel Vmlinuz
Append ks=http://192.168.1.200/ks.cfg initrd=initrd.img nomodeset
Label Rescue
Menu Label ^rescue installed system
Kernel Vmlinuz
Append initrd=initrd.img Rescue
Label Local
Menu label Boot from ^local Drive
Localboot 0xFFFF
Label Memtest86
Menu Label ^memory Test
Kernel memtest
Append-
4. Generate the Ks.cfg file in desktop mode and copy to/var/www/html/ks.cfg
# System-config-kickstart
51cto map too TM pit! Spit out the trough a bit! Upset!
Steps:
Select the time zone, select Install restart, choose Reset bootloader, select Clear All partitions, select Installation method: HTTP--->http://192.168.1.200 directory: CENTOS6, configure the installed partition, select the installation package. OK, save the file to/var/www/html/ks.cfg.
5. Open service:
# service httpd Start
# service DHCPD Start
# Service XINETD Restart
6. Test:
First Test httpd: Open Browser Input: Http://192.168.1.200/ks.cfg and then enter: HTTP://192.168.1.200/CENTOS6 If you turn it off, check that the HTTPD service is working properly and that the firewall is working.
Turn on the client NIC to start.
This article is from the "allen03301" blog, make sure to keep this source http://allen03301.blog.51cto.com/1300992/1881347
Pxe+dhcp+kickstart