system-config-kickstart

本文最后更新于:2023年12月5日 晚上

如果是 SecureCRT,需要安装 Xming:下载地址

基本配置

┌────────────────────────────────────────────────────────┐
│#Basic Configuration========================================================#platform=x86, AMD64, or Intel EM64T#Default Language默认语言
│lang en_US
│# Keyboard 键盘
│keyboard 'us'# timezone 时区(勾选了"Use UTC clock" 会追加[--isUtc])
│timezone Asia/Shanghai
│# Root password
│rootpw --iscrypted $1$DBk7xfJp$Agxd303XUAfRKIf7gB8DG/
└──────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────┐
│#Advanced Configuration
│勾选就有,不勾没有
│========================================================# Reboot after installation
│reboot
│# Use text mode install
│text
└────────────────────────────────────────────────────────┘

安装方法

┌────────────────────────────────────────────────────────┐
│#Installation Method========================================================# Install OS instead of upgrade
│install
│# Upgrade existing installation
│upgrade
└────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────┐
│#Installation source
│选了哪项就写哪项
│========================================================# Use CDROM installation media
│cdrom
│# Use NFS installation media
│nfs --server=服务器 --dir=目录
│# Use network installation
│url --url="ftp://用户名:密码@服务器/目录"# Use network installation
│url --url="http://服务器/目录"# Use hard drive installation media
│harddrive --dir=目录 --partition=分区└────────────────────────────────────────────────────────┘

引导选项

┌────────────────────────────────────────────────────────────────┐
│#Installation Method&GRUB options&Install Options=================================================================
│ ┌────────────────────────────────────┐
│ │ 选择了Do not install a boot loader │
│ └────────────────────────────────────┘
│ # System bootloader configuration
│ bootloader --location=none
│
│ ┌────────────────────────────────────┐
│ │ 选择了install new boot loader │
│ └────────────────────────────────────┘
│ bootloader --append="ker" --location=mbr --password="123"#append是内核参数,location是bootloader安装位置,password是GRUB密码
└────────────────────────────────────────────────────────────────┘

分区信息

┌─────────────────────────────────────────────────────┐
│# Master Boot Record#Master Boot Record选择了clear... 否则就没有======================================================# Clear the Master Boot Record
│zerombr
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│# Partitions&Disk Label======================================================# Partition clearing information
│clearpart --linux --initlabel
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│# Layout 分区
│part 挂载点 --fstype=文件系统 --size=大小(单位M)======================================================# Disk partitioning information
│part / --fstype="xfs" --size=10240
│part /boot --fstype="ext4" --size=1024
│part swap --fstype="swap" --size=2048
└─────────────────────────────────────────────────────┘

网络配置

┌─────────────────────────────────────────────────────┐
│# Network Configuration
│Centos7如果要写eth0,要加内核参数net.ifnames=0======================================================# Network information
│network --bootproto=dhcp --device=eth0
└─────────────────────────────────────────────────────┘

认证

┌───────────────────────────────────────────────────────────────┐
│# Authentication
│如果勾选Enable Fingerprint reader则追加参数 --enablefingerprint===============================================================# System authorization information
│auth --useshadow --passalgo=md5
└───────────────────────────────────────────────────────────────┘

防火墙配置

┌───────────────────────────────────────────────────────────────┐
│# Firewall Configuration===============================================================# SELinux configuration
│selinux --disabled或permissive或enforcing
│
│# Firewall configuration
│firewall --disabled或enabled
│#如果是enable,可以在追加:--http --ftp --telnet --smtp --ssh#还可以追加端口:--port=555:tcp,444:udp
└───────────────────────────────────────────────────────────────┘

Display Configuration

┌───────────────────────────────────────────────────────────────┐
│# Display Configuration===============================================================
│如果选了安装图形界面,就没有下面这句话
│# Do not configure the X Window System
│skipx
│# Run the Setup Agent on first boot
│firstboot --enable或disable
└───────────────────────────────────────────────────────────────┘

Package Selection

如果包安装的界面不出现可选的包信息,那么需要修改 yum 仓库配置文件

[root@centos ~]#vim /etc/yum.repos.d/***.repo
[development]
#把原来"[]"内的内容改成development,其它不变

system-config-kickstart
http://blog.lujinkai.cn/运维/运维自动化/系统部署/system-config-kickstart/
作者
像方便面一样的男子
发布于
2020年12月9日
更新于
2023年12月5日
许可协议