Pxe+kickstart Implementing unattended Batch installation Linux
Lab Preparation: Host Myrhel2 as the server side, create a new virtual host with no operating system installed and the same network segment as the server side
Conditions for installation:
Server-side:
???? Support TFTP : Provides files necessary for boot files and system installation
???? Support DHCP servers: assigning IP Address, location TFTP server location.
Client:
???? Network card support PXE Protocol
???? motherboard support Network boot
- Environment preparation
- Close Iptables SELinux
# Service Iptables Stop
# iptables–f
# Setenforce 0
- Turn on the virtual machine and configure an infrequently used IP address
#vim/etc/sysconfig/network-scripts/ifcfg-eth0
ipaddr=192.168.10.2
netmask=255.255.255.0
- Install packages
#yum –y Install TFTP tftp-server DHCP vsftpd syslinux
- Configure VSFTP services
#mkdir DVD
#chmod 777 dvd/
#mount/dev/sr0/var/ Ftp/pub/dvd
#service vsftpd start
#chkconfig vsftpd on
- Configuring the DHCP service
#cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf
#vim/etc/dhcp/dhcpd.conf
#service DHCPD Start
#chkconfig DHCPD on
- Configuring the TFTP service
#vim/etc/xinetd.d/tftp
#mkdir/tftpboot
#cd/tftpboot
#mkdir pxelinux.cfg
#cp/usr/share/syslinux/pxelinux.0/tftpboot/
#cp/var/ftp/pub/dvd/isolinux/isolinux.cfg/tftpboot/pxelinux.cfg/default
#chmod 644 Pexlinux.cfg/default
#cp/var/ftp/pub/dvd/isolinux/*/tftpboot/
#service xinetd Start
#chkconfig TFTP on
- Configure Unattended
#yum-y Install System-config-kickstart
# System-config-kickstart
According to their own situation, fill in the relevant information
Finally click Save, the following screen appears
Finally click on the "Save" button
#cp/root/ks.cfg/var/ftp/pub
#vim/tftpboot/pxelinux.cfg/default
In Append initrd=initrd.img ks=ftp://192.168.10.2/pub/ks.cfg
8 , client Settings
powering on F2, Enter BIOS interface that adjusts the boot sequence to boot from the network
Press F10 save exit, System restart
Select the first item, enter, and the following operation will be completed automatically.
Pxe+kickstart for unattended batch installation of Linux