system-config-kickstart

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

基本配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
┌────────────────────────────────────────────────────────┐
#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
└────────────────────────────────────────────────────────┘

安装方法

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
┌────────────────────────────────────────────────────────┐
#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=分区└────────────────────────────────────────────────────────┘

引导选项

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
┌────────────────────────────────────────────────────────────────┐
#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密码
└────────────────────────────────────────────────────────────────┘

分区信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
┌─────────────────────────────────────────────────────┐
# 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
└─────────────────────────────────────────────────────┘

网络配置

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

认证

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

防火墙配置

1
2
3
4
5
6
7
8
9
10
11
┌───────────────────────────────────────────────────────────────┐
# 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

1
2
3
4
5
6
7
8
9
┌───────────────────────────────────────────────────────────────┐
# Display Configuration
│===============================================================
│如果选了安装图形界面,就没有下面这句话
# Do not configure the X Window System
│skipx
# Run the Setup Agent on first boot
│firstboot --enabledisable
└───────────────────────────────────────────────────────────────┘

Package Selection

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

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