Referring to the 51cto blog of the Great God of the article, combined with their own practice process, although experienced some difficulties in the middle, and finally successfully completed the configuration, the implementation of the automated installation of Linux.
(Key reference to gray blog, http://rrliang.blog.51cto.com/4214966/1040863)
Installation environment, virtual machine VirtualBox Virtual 2 machines, one to do kickstart server, one to do the client
The server system is CentOS 6.3 x86_64, the installation CD is CentOS 6.3 x86_64 DVD
NIC is all configured as "Internal network"
First of all, need to use the services are, DHCPD, httpd, xinetd, TFTP, yum in order to install.
Vim/etc/xinetd.d/tftp modifies the TFTP daemon configuration file, where the red section is modified,
Service tftp
{
Disable = no
socket_type = dgram
protocol = UDP
Wait = yes
User = root
Server =/usr/sbin/in.tftpd
Server_args =-u nobody-s/tftpboot
per_ SOURCE = one
cps = 2
Flags = IPv4
}
vim/etc/dhcp/dhcpd.conf Modify DHCP configuration file
Ddns-update-style Interim;
Allow booting;
Allow BOOTP;
Ignore client-updates;
Set vendorclass = option Vendor-class-identifier;
Subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 192.168.0.10 192.168.0.50;
FileName "/pxelinux.0";
Default-lease-time 21600;
Max-lease-time 43200;
Next-server 192.168.0.1;
}
Brief introduction:
Option routers specify Gateway;
Option domain-name-server Specifies the DNS server;
Option subnet-mask Specifies the mask;
Range DYNAMIC-BOOTP Specifies the IP address segment assigned to the client;
FILENAME specifies the starting mirror;
NEXT-SERVER specifies the TFTP server.
The server's NIC Ifcfg-eth0 is configured as static ip:192.168.0.1, subnet mask 255.255.255.0, Gateway 192.168.0.1
Set up boot service,
Chkconfig xinetd on
Chkconfig DHCPD on
Chkconfig httpd on
Start the service in turn
Service xinetd Start
Service DHCPD Start
Service httpd Start
Note To turn off the firewall, SELinux set to permissive, or it will cause PXE load failure
Mount Linux installation disk, Mkdir-p/mnt/iso, Mount-o Loop/dev/dvd/mnt/iso,
cp/mnt/iso/*/var/www/html, copy the contents of the disc to the HTML root directory (installed in httpd mode),
Create the directory/tftpboot, copy the Linux installer's kernel, root file system files, and other files to the TFTP root directory.
List the files that are probably used under the/tftpboot directory,
Initrd.img (file, copy from CD/mnt/iso/isolinux/directory)
pxelinux.0 (file, copy from/usr/share/syslinux directory, if not, you must install Syslinux)
Pxelinux.cfg (directory, self-built, containing file named default, which is copied from/mnt/iso/isolinux/isolinux.cfg and renamed to default)
Vmlinuz (file, copy from/mnt/iso/isolinux/directory)
VESAMENU.C32 (file, copy from/mnt/iso/isolinux/directory)
Attention permissions, chmod +x/tftpboot/pxelinux.cfg/default
To configure kickstart graphically, you need to install System-config-kickstart, which is simpler and less detailed,
To configure the text to kickstart, ks.cfg files are configured.
Copy/root/anaconda-ks.cfg file mode: Red hat operating system, after the system is installed, will automatically create a anaconda-ks.cfg file in the root directory, this file is a real record of the system installation process configuration. We can copy this file and configure it on its basis.
CP Anaconda-ks.cfg/var/ww/html/ks.cfg
chmod +r/var/www/html/ks.cfg