Kickstart configuration script instance

Source: Internet
Author: User

Kickstart configuration script instance

######################################## #######################
#
# Sample Kickstart Configuration File
#
######################################## #######################
######################################## #######################
#
# Point to a local installation server, or use "cdrom"
#
######################################## #######################
Url -- url http: // rha-server/pub/rhel5/
# Cdrom
Rootpw RedHat
Bootloader -- location = mbr -- password = redhat
######################################## #######################
#
# Partitioning

#
######################################## #######################
Zerombr yes
Clearpart -- all -- initlabel
Part/boot -- fstype ext3 -- size 128
Part/-- fstype ext3 -- size 1 -- grow
Part swap -- recommended
######################################## #######################
#
# Network configuration
#-The following is for the "recommended solution" outlined
# In the Red Hat Academy Instructor's Guide
#
######################################## #######################
Network -- bootproto = dhcp -- device = eth0
Firewall -- disabled
# Network -- bootproto = static -- ip = 192.168.0.254 -- netmask = 255.255.255.0
-- Device = eth0
# Firewall -- medium -- http -- port = https: tcp
######################################## #######################
#
# Environment
#
######################################## #######################
Lang zh_CN.UTF-8
Timezone Asia/Shanghai
######################################## #######################
#
# Hardware
#
######################################## #######################
Keyboard us
Xconfig -- startxonboot
######################################## #######################
# Misc
######################################## #######################
Key -- skip # skip install number
Authconfig -- enableshadow -- enablemd5
Reboot # reboot automatically when done
Install # instead of "upgrade"
######################################## #######################
#
# Software
#
######################################## #######################
% Packages -- resolvedeps
@ Admin-tools
@ Editors
@ Text-internet
@ Gnome-desktop
@ Core
@ Base
@ Base-x
@ Chinese-support
@ Sound-and-video
@ Graphical-internet
Emacs
Kexec-tools
Device-mapper-multipath
Xorg-x11-utils
Xorg-x11-server-Xnest
-Sysreport
% Post
######################################## #######################
#
# Post Script-the following script runs on the newly
# Installed machine, immediately after installation
#
######################################## #######################
Echo "nameserver 192.168.0.254">/etc/resolv. conf
Rpm-ivh ftp: // rha-server/rha/autoupdate/rha-base *. rpm
# Rpm-fvl ftp://kickstart.example.com/pub/9/ I #/updates/#.rpm
# Curl http: // rha-server/rha/xorg. conf>/etc/X11/xorg. conf
# Curl http: // rha-server/rha/station. cfg | tar xvzf-
For I in elvis blondie prince madonna; do
Useradd $ I
Echo redhat | passwd -- stdin $ I
Done

Kickstart script design

The Kickstart script usually has three different parts.

Command Section

Software Package Section

Script after installation

Anaconda ignores all rows starting with "#" And empty rows in the Kickstart script.

Command Section

From the beginning of the file until the line starting with % packages appears, this part belongs to the command part. The command line must start with a recognizable keyword, and all parameters related to this keyword must appear in the same line. The command part is used to specify all the standard information except the software options required by the installer. Keywords can appear in any order in the command section.

Package section (% packages)

The software package is used to specify the software to be installed. This part starts from the row starting with % packages

A row starting with "%. This part usually uses one of the following two formats.

@ Component Name

Package-name

The first format is to use a software group to specify the software. Here, be sure to spell the software group name correctly, and pay attention to the case.

The second format is used to specify the name of the software package to be installed. If the % packages row contains an additional -- resolvedeps parameter, the dependent software package is also installed.

Post-installation script (% post)

The post-processing part is to execute the custom process for all machines with new systems installed without the participation of the Anaconda installer. The execution of this part is the same as running the Bash Shell script in the environment of the machine where the new system is installed. For network installation, you can also execute the script as an instance to activate the network configuration.

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.