Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ways to configure Kickstart scripts to better install the system

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "configuration of Kickstart scripts in order to better install the system", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "configure Kickstart scripts in order to better install the system" bar!

How to configure kickstart scripts

# # #

#

# 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-Fvh ftp://Kickstart.example.com/pub/9/i386/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

Kickstart scripts usually have three different parts.

Command section

: software package section

Post-installation script section

Anaconda ignores all lines and blank lines that start with "#" in the Kickstart script.

Command section

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

Package section (% packages)

The package part is used to specify the software that needs to be installed. This section starts with the line starting with% packages and goes down

Ends with a line that begins with the "%" character. This section is usually in one of two formats.

: @ Component Name

: package-name

The first format is to use the software group to specify the software. Be sure to spell the software group name correctly and pay attention to the case here.

The second format is used to specify the specific name of the package to be installed. If the% packages line contains an additional-- resolvedeps parameter, a package that addresses dependencies will also be installed.

Post-installation script section (% post)

The post-processing part performs the customization process for all newly installed machines without the participation of the Anaconda installer. Executing this section has the same effect as running the Bash Shell script on the machine on which the newly installed system is installed. If it is a network installation, executing the script mentioned earlier as an example can also activate the network configuration.

Thank you for reading, the above is the content of "configuring Kickstart scripts to better install the system". After the study of this article, I believe you have a deeper understanding of the problem of configuring Kickstart scripts to better install the system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report