KickstartAutomated Installation Platform
As the company's business continues to grow, it often needs to purchase new servers, and requires Linux to be installed in a consistent way, to facilitate future maintenance and management, and to waste more time on each manual installation of the Linux system, but wouldn't it be better if we had a way to save time?
Large and medium-sized Internet companies on a procurement server hundred, if the use of manual one installation, a person must make a bad n CD, how many overtime to complete this "arduous" task, we can see the whole artificial to complete such work is too waste of manpower, there is no automated installation platform, Through an existing system and then cloning or copying to the new server. The kickstart can do the work without any difficulty.
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, during the boot process, the terminal requires the server to assign an IP address, and then uses the TFTP (trivial File Transfer Protocol) protocol to download a boot package to native memory execution.
To use the Kickstart installation platform, the complete architecture includes the following: Kickstart+dhcp+nfs+tftp+pxe, from the architecture you can see roughly the services that need to be installed, such as DHCP, TFTP, NFS, Kickstart/pxe, and so on.
[Email protected]_168_77_199 ~]# cat/etc/issue
CentOS Release 6.6 (Final)
Kernel \ r on an \m
[Email protected]_168_77_199 ~]# uname-r
2.6.32-504.el6.x86_64
Yum install-y dhcp* tftp* nfs* syslinux-y
First configure the TFTP service: vi/etc/xinetd.d/tftp, just change disable = yes to disable = No.
Ln-s/var/lib/tftpboot//link to the root directory below
cd/tftpboot/; cp/usr/share/syslinux/pxelinux.0. ; CP/MNT/IMAGES/PXEBOOT/{VMLINUZ,INITRD.IMG}. ; mkdir pxelinux.cfg; Cp/mnt/isolinux/isolinux.cfg./default
Add in default: Label centos6.6
Kernel Vmlinuz
Append ks=nfs:192.168.77.199:/data/centos/ks.cfg ksdevice=eth0 initrd=initrd.img
650) this.width=650; "title=" 4.jpg "alt=" wkiol1wf7htbbzb4aags6-ods9e741.jpg "src=" http://s3.51cto.com/wyfs02/M00/ 6f/8d/wkiol1wf7htbbzb4aags6-ods9e741.jpg "/>
Mkdir-p/data/centos; cd/data/centos/Shared CentOS Directory vi/etc/exports add:/data/centos * (Rw,sync); Nohup cp/mnt/*. -A & Background copy the disc file to a shared directory under CentOS
-
config ks.cfg cd/data/centos VI/ETC/KS.CFG Add the following configuration content: Ks.cfg can also be modified by copying the anaconda-ks.cfg under the root directory
# kickstart file automatically generated by anaconda. #version = Develinstalltextnfs --server=192.168.77.199 --dir=/data/centos/lang zh_cn. utf-8keyboard usnetwork --onboot no --device eth0 --bootproto dhcp -- noipv6rootpw 123456firewall --disabledauthconfig --enableshadow --passalgo= Sha512selinux --disabledreboottimezone asia/shanghaibootloader --location=mbr --driveorder =sda --append= "Rhgb quiet" zerombr# the following is the partition information you requested# note that any partitions you deleted are not expressed# here so unless you clear all partitions First, this is# not guaranteed to work#clearpart --noneclearpart --all --initlabel --drives=sdapart /boot --fstype&Nbsp;ext4 --size=200part swap --size=2000part / --fstype ext4 --size= 10000part /data --fstype ext4 --size=1 --grow#clearpart --all --initlabel# part /boot --fstype=ext4 --size=200#part / --fstype=ext4 --size=10000#part swap --size=2000#part /data --fstype=ext4 --size=1 --grow#part /data -- Fstype=ext4 --grow --size=200#repo --name= "CentOS" --baseurl=cdrom:sr0 --cost= 100% Packages@chinese-support@core@development@eclipse@emacs@server-policy@tex@workstation-policyantrpmdevtoolsjpackage-utilsr Pmlint%end
To configure the DHCPD service:
Ddns-update-style interim;ignore client-updates;next-server 192.168.77.199;filename "pxelinux.0"; allow booting; Allow Bootp;subnet 192.168.77.0 netmask 255.255.255.0 {#---default gatewayoption routers 192.168.77.1;option su Bnet-mask 255.255.255.0;range DYNAMIC-BOOTP 192.168.77.100 192.168.77.200;host ns {hardware Ethernet 00:1a:a0:2b:38: 81;fixed-address 192.168.77.101;}}
Service xinetd Restart
Service NFS Restart
Service DHCPD Restart can be installed automatically after restarting it but requires manual input centos6.6
Automatic installation no need to enter anything: Ks.cfg file configuration do not change just change the default configuration as follows:
Default Vesamenu.c32
#prompt 1
Default KS
Timeout 600
Display Boot.msg
Menu Background Splash.jpg
Menu title Welcome to CentOS 6.6!
Menu Color Border 0 #ffffffff #00000000
Menu Color SEL 7 #ffffffff #ff000000
Menu Color Title 0 #ffffffff #00000000
Menu Color tabmsg 0 #ffffffff #00000000
Menu Color Unsel 0 #ffffffff #00000000
Menu Color Hotsel 0 #ff000000 #ffffffff
Menu Color Hotkey 7 #ffffffff #ff000000
Menu Color ScrollBar 0 #ffffffff #00000000
#label KS
# kernel Vmlinuz
# Append Ks=http://192.168.77.199/ks.cfg initrd=initrd.img
Label KS
Kernel Vmlinuz
Append ks=nfs:192.168.77.199:/data/centos/ks.cfg ksdevice=eth0 initrd=initrd.img
Label Linux
Menu label ^install or upgrade an existing system
Menu default
Kernel Vmlinuz
Append initrd=initrd.img
Label VESA
Menu Label Install system with ^basic video driver
Kernel Vmlinuz
Append initrd=initrd.img Xdriver=vesa Nomodeset
Label Rescue
Menu Label ^rescue installed system
Kernel Vmlinuz
Append initrd=initrd.img Rescue
Label Local
Menu label Boot from ^local Drive
Localboot 0xFFFF
Label Memtest86
Menu Label ^memory Test
Kernel memtest
Append-
The above is all the configuration installation details, please refer to:
Http://www.xue163.com/332/1654/3327690.html
This article is from the "Fluffy Duck" blog, please be sure to keep this source http://woshitieren.blog.51cto.com/2466034/1673196
Kickstart installation Configuration