Using the network installation system process:
1. Configure DHCP to enable clients to obtain IP automatically, add the pxelinux.0 configuration to the DHCP configuration, and enable clients to connect TFTP files
2. Copy all the files under the Isolinux folder of the disc image to the root of the TFTP and copy the/usr/share/syslinux/pxelinux.0 into the TFTP root directory
3. Create a pxelinux.cfg folder in the root directory of TFTP, copy the Isolinux.cfg file from the root of the TFTP to the Pxelinux.cfg folder, and modify it to Defualt
4. Modify the Defualt file
-------------------------------------------------------------------------------
Specific code:
Prerequisite Preparation: Install HTTP, copy the system that needs to be installed to the root directory of HTTP
1.mount/dev/cdrom/media
2.mkdir/var/www/html/redhat6
3.cp-r/media/var/www/html/redhat6
4.yum Install httpd
5.service httpd Restart
6.chkconfig httpd on
7.yum Install DHCP
8.cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf
9.vim/etc/dhcp/dhcpd.conf
FileName "pxelinux.0";
Next-server 172.25.254.241; #dhcp的服务器ip
Subnet 172.25.254.0 netmask 255.255.255.0 {
Range 172.25.254.200 172.25.254.210; #范围
Option Domain-name-servers 172.25.254.241; #dns地址
Option Domain-name "example2.com"; #dns主机名
Default-lease-time 600;
Max-lease-time 7200;
}
10.service dhcpd Restart
11.yum-y Install Tftp-server
12.chkconfig TFTP on
13.vim/etc/xinetd.d/tftp Modify Disable = no
14.service xinetd Restart
15.chkconfig xinetd on
16.cp-r/var/www/html/redhat6/isolinux/*/var/lib/tftpboot/
17.yum Install Syslinux
18.cp/usr/share/syslinux/pxelinux.0/var/lib/tftboot/
19.mkdir/var/lib/tftpboot/pxelinux.cfg
20.cp/var/lib/tftpboot/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default
Label Install RED HAT 6.4 #添加这个label
Menu Label Install ^red HAT 6.4
Kernel Vmlinuz
Append initrd=initrd.img ks=http://172.25.254.241/redhat6/ks.cfg
21.yum Install System-config-kickstart
22.system-config-kickstart #使用工具创建ks文件
23.CP ks.cfg/var/www/html/redhat6/#拷贝在对应的目录
Note: If you need to perform some operations after installation, such as installing HTTPD,VSFTPD, etc., you need to add post-installation script, see Kickstart detailed
PXE Install Linux system