Centos6.5kickstart Unattended Installation
Method: Vsftpd+tftp+dhcp+kickstart+pxe
One: The environment a machine that has already installed the operating system (192.168.1.5) and a non-installed operating system of the machine
1. Do not install the operating system first raid, to Dell R710, for example, 6 hard disks, generally two pieces do raid1,
There are four pieces left to do RAID5.
2. Already installed the operating system of the machine first check whether to install VSFTPD,DHCPD,TFTP, if not installed, then install, close iptables,selinux.
/etc/init.d/iptables stop
Chkconfig iptables off |
Close Iptables |
Setenfence 0 |
Turn off SELinux |
1) Hang on the disc image to the specified folder, this folder can be arbitrarily assigned, such as on/opt
Cd/opt/packages
RPM-IVH vsftpd* Installation vsftpd
/ETC/INIT.D/VSFTPD start |
Start VSFTPD |
Chkconfig vsftpd on |
Boot up |
Cp-r/opt/*/var/ftp/pub to the/var/ftp/pub of all the documents under OPT
2) Install TFTP and tftp-server
Yum Install tftp*-y
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 |
|
Change the original yes to No |
Can
Per_source |
= 11 |
Cps |
= 100 2 |
flog= |
= IPv4 |
}
/etc/init.d/xinetd start
Lsof-i:69 to see if TFTP starts properly, the TFTP process starts normally
3) Configure PXE Note I have copied the contents of the CD into the/var/ftp/pub , and then I need some files to go to this directory to test
1. Enter the Tftpboot folder, no one is built, there is no need to build
Cd/var/lib/tftpboot
2. copy pxelinux.0 and VESAMENU.C32 to Tftpboot if the Syslinux directory is not found, you need to install Yum installsystem-config-kickstart-y
Cd/usr/share/syslinux CP pxelinux.0/var/lib/tftpboot CP Vesamenu.c32/var/lib/tftpboot
3. Copy the initrd.img and Vmlinux to the Tftpboot
Cp/var/ftp/pub/image/pxeboot/initrd.img/var/lib/tftpboot Cp/var/ftp/pub/image/pxeboot/vmlinux/var/lib/tftpboot
4. Copy the isolinux/*.msg to Tftpboot cp/var/ftp/pub/isolinux/*.msg/var/lib/tftpboot
5. Create a pxelinux.cfg directory under Tftpboot and copy Isolinux.cfg to Pxelinux.cfg/default
Mkdir-p/var/lib/tftpboot/pxelinux.cfg cd/var/lib/tftpboot/pxelinux.cfg
Cp/var/ftp/pub/isolinux/isolinux.cfg/var/lib/tftpboot/pxelinux.cfg/default
6. Modify The default file and Modify permissions
Chmod 644default
Vim default Label Linux
Menu label ^install or upgrade an existing system menu default
4) Install DHCPD service
Yum Install dhcp*-y
Cp/usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample/etc/dhcp/dhcpd.conf Replicating DHCP
template files, renaming
Vim/etc/dhcp/dhcpd.conf Modifying a configuration file
Ddns-update-styleinterim;
Ignoreclient-updates;
FileName "pxelinux.0"; |
Note that the filename position must not be placed under the subnet |
Next-server 192.168.1.5; |
|
Subnet 192.168.1.0netmask 255.255.255.0 {
#next-server 192.168.1.5; PXE server address
#filename "/var/lib/tftpboot/pxelinux.0";
#filename "pxelinux.0";
Optiondomain-name-servers 192.168.1.5;
Option routers |
192.168.1.5; |
Option Subnet-mask |
255.255.255.0; |
Range DYNAMIC-BOOTP |
192.168.1.230 192.168.1.240; |
Default-lease-time |
21600; |
Max-lease-time |
43200; |
}
5) Open the terminal input System-config-kickstart to select the installation parameters
Firewall–disabled--ssh
# Install Osinstead of upgrade install
# Use Network installation URL--url= "Ftp://192.168.1.5/pub"
# Root Password Rootpw--iscrypted $1$xihmvh15$ihjfrku4lkmeyyhgryd0a.
# System Authorization Information auth--useshadow--passalgo=md5 # usegraphical Install graphical firstboot--disable # System Keyboard keyboard US #System language lang en_US
# SELinux Configuration SELinux--disabled #Installation logging Level skipx Logging--level=info # Reboot Afterinstallati On reboot # System timezone timezone--ISUTC Asia/shanghai
# Network Information
Network--bootproto=static--device=eth0--gateway=192.168.1.5--ip=192.168.1.230
--nameserver=192.168.1.5--netmask=255.255.255.0--onboot=on
# System bootloader Configurationbootloader--location=mbr
# Clear the Master Boot Record
ZEROMBR Yes
# Partition Clearing Information clearpart--all--initlabel # Disk Partitioning information part swap--fstype= "swap"--siz e=4096 part/--asprimary--fstype= "Ext4"--size=8192
%packages
@basic-desktop
%end
Next to install the operating system of the machine can be set to network boot installed (to be in the same LAN), remember that after the installation, change the boot sequence, remember the boot does not take precedence from the network boot installation.
Kickstart unattended, PXE+TFTP+FTP+DHCP