Tutorials for installing CentOS using Kickstart automation

Source: Internet
Author: User
Tags mkdir centos


Because of the need to centrally deploy CentOS in a tidal x86 server to build a large data platform based on Hadoop, usually contact SLEs (SuSE Linux Enterprise server) More and implemented automated installation of CD-ROM or PXE network based on Autoyast (subsequent sharing of specific implementation methods). This is mainly through learning kisckstart to achieve the simplest way to automate the installation of optical disk CentOS, while most of the online tutorials are not fully applicable to their own environment, this article will no longer repeat the kickstart related concepts, details can be referred to the extended reading.

Kickstart is one of the most common methods of Linux automation installation

Environmental preparedness

Custom Systems


Official Download Address-http://wiki.centos.org/Download

Installing packages

Agent Internet tips, export http_proxy=ip:port

The code is as follows:

Yum-y Install Createrepo Mkisofs

Production process

Directory structure

Copy CentOS original mirror content, do not do any streamlining

The code is as follows:





Add Kickstart configuration file

File path and installation method can be defined freely

Copy Code

The code is as follows:


#修改引导, pay attention to the ks= part.

VI isolinux.cfg

Label Linux

Menu label ^install or upgrade an existing system

Menu default

Kernel Vmlinuz

Append initrd=initrd.img ks=cdrom:/isolinux/ks.cfg


VI ks.cfg

< p> #Kickstart file automatically generated by Anaconda.

#version =devel

#Install OS instead of upgrade

#表示是安装 instead of upgrading


#Use Text Mode Install



#Use Network Installation



#Local installation use CDROM installation media



#Installation number Configuration

#如果是RedHat的系统, you will be required to enter key, which is configured to skip, and if you do not configure the installation will stop there and require the user to enter key

#key –skip

#System language


#lang en_US. UTF-8

Lang Zh_cn. UTF-8

#System keyboard


Keyboard US

#Network Information


#network--device eth0--bootproto DHCP--onboot Yes

#Root Password


ROOTPW Chinaums

#Firewall Configuration



#SELinux Configuration



#Run the Setup Agent on the ' I ' Boot



#System Authorization Information

#用户认证配置, Useshadow represents the use of local authentication,--passalgo represents a cryptographic algorithm


#System timezone


TimeZone--ISUTC Asia/shanghai

#System bootloader Configuration

#指明bootloader的安装位置, indicating the ordering of the drive, indicating the parameters passed to the kernel after the operating system installation is complete

bootloader--location=mbr--driveorder=sda--append= "Crashkernel=auto rhgb"

#Clear the Master Boot record



#Partition Clearing Information



#Disk Partitioning Information


#创建一个200M大小的分区挂载/boot Type is EXT4



Part swap--size=20000--ONDISK=SDA



#Reboot after installation



#This packages is for CentOS 6.4

#为CentOS 6.4 Customized Packages







#config Service


Service NetworkManager Stop

Chkconfig NetworkManager off

#eject CDROM








Build dependencies and ISO files

Note the accuracy of the path and the command

The code is as follows:


Createrepo-g Repodata/*comps.xml.

Mkisofs-o/tmp/centos-6.4_64_auto.iso-b isolinux/isolinux.bin-c isolinux/boot.cat-no-emul-boot-boot-load-size 4- Boot-info-table-joliet-long-r-j-v-t/tmp/iso/

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.