Environment Preparation:
A single server
Pxe+kickstart Automatic Installation principle:
PXE (Preboot Execute environment, pre-boot execution Environment) is the latest technology developed by Intel Corporation, working in the network mode of client/server, enabling workstations to download images from remote servers over the network, This supports booting the operating system over the network, and during the boot process, the terminal requires the server to assign an IP address, then TFTP (trivial File Transfer Protocol) or MTFTP (Multicast trivial file transfer Protocol) protocol to download a boot package to native memory execution, completed by this boot package terminal (customer? Basic software settings to boot the terminal operating system that is pre-installed in the server. PXE can boot a variety of operating systems, such as: Windows95/98/2000/windows2003/windows2008/winxp/win7/win8,linux.
Schematic diagram
Preparation conditions:
An image file
HTTPD Service
TFTP service
DHCP service
[[email protected] tftpboot]# mount/dev/cdrom/mnt/[[email protected] tftpboot]# yum install httpd DHCP Tftp-server Createrepo xinetd-y[[email protected] tftpboot]# mkdir/var/www/html/centos-7.1-x86_64/[[email protected] tftpboot]# cp-a/mnt/*/var/www/html/centos-7.1-x86_64/[[email protected] tftpboot]# createrepo-pdo/var/www/html/centos-7.1-x86_64//var/www/html/centos-7.1-x86_64/[[email protected] Tftpboot] # createrepo-g ' ls/var/www/html/centos-7.1-x86_64/*-comps.xml '/var/www/html/centos-7.1-x86_64/[[email Protected] tftpboot]# vim/etc/xinetd.d/tftp disable = no[[email protected] dhcp-4.2.5]# C P/usr/share/doc/dhcp-4.2.5/dhcpd.conf.example/etc/dhcp/dhcpd.confsubnet 192.168.220.0 netmask 255.255.255.0 {Range DYNAMIC-BOOTP 192.168.220.10 192.168.220.90; Option Subnet-mask 255.255.255.0; Next-server 192.168.220.165; FileName "pxelinux.0";} [[email protected] dhcp-4.2.5]# service DHCPD startredirecting To/bin/systemctl start dhcpd.service[[email protected] dhcp-4.2.5]# service httpd startredirecting to/bin/syst Emctl start httpd.service[[email protected] dhcp-4.2.5]# service xinetd startredirecting to/bin/systemctl start XI Netd.service[[email protected] dhcp-4.2.5]# upload ks.cfg file to/var/www/html/centos-7.1-x86_64/[[email Protected] dhcp-4.2.5]# yum install syslinux-y[[email protected] dhcp-4.2.5]# cp/usr/share/syslinux/pxelinux.0/ Var/lib/tftpboot/[[email protected] dhcp-4.2.5]# cp/mnt/isolinux/*/var/lib/tftpboot/[[email protected] tftpboot]# mkdir/var/lib/tftpboot/pxelinux.cfg[[email protected] tftpboot]# Cp/mnt/isolinux/isolinux.cfg/var /lib/tftpboot/pxelinux.cfg/default[[email protected] pxelinux.cfg]# vim default label Linux menu label ^auto Install CentOS 7 kernel vmlinuz append initrd=initrd.img ks=http://192.168.220.165/centos-7.1-x86_64/centos-7.1-x86_ 64.cfg[[email protected] pxelinux.cfg]# Getenforce permissive[[eMail protected] pxelinux.cfg]# setenforce 0[[email protected] pxelinux.cfg]# vim/etc/selinux/config SELINU X=disabled[[email protected] pxelinux.cfg]# service firewalld stopredirecting to/bin/systemctl stop Firewalld.service[[email protected] pxelinux.cfg]#
Pxe+kickstart Cobbler Unattended Installation