不同版本的centos默认的ks.cfg

1、centos6.5

  • CentOS-6.5-x86_64-bin-DVD1.iso
# Kickstart file automatically generated by anaconda.

#version=DEVEL
install
cdrom
lang en_US.UTF-8
keyboard us
network --onboot no --device eth0 --bootproto dhcp --noipv6
rootpw  --iscrypted $6$oOPRW2wimev3SGXr$kxDzyr9FKt1fiwK5qRcBmfMKJYBeU6vxowhkJgCYjNhp5ATLbd2kBMKkm1kj6Gkg6wZbm66f8STvlve/Skme41
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc Asia/Shanghai
bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
#clearpart --all --drives=sda

#part /boot --fstype=ext4 --size=500
#part pv.008002 --grow --size=1

#volgroup vg_yinheos --pesize=4096 pv.008002
#logvol / --fstype=ext4 --name=lv_root --vgname=vg_yinheos --grow --size=1024 --maxsize=51200
#logvol swap --name=lv_swap --vgname=vg_yinheos --grow --size=1984 --maxsize=1984

repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100

%packages
@core
@server-policy
@workstation-policy
%end

2、centos7.5

  • CentOS-7-x86_64-DVD-1804.iso
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=ens33 --onboot=off --ipv6=auto --no-activate
network  --hostname=localhost.localdomain

# Root password
rootpw --iscrypted $6$LG8sCcs8Z3iOUfhr$FTi4JkCvzYzkit4PjnSXdFXkShQeaa1oY.k8bE52WD2mVKRVpgX8wkgAbyIMgnUizDzQPFHQFKXboJhoFQHC1.
# System services
services --enabled="chronyd"
# System timezone
timezone America/New_York --isUtc
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel

%packages
@^minimal
@core
chrony
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=50 --notstrict --nochanges --notempty
pwpolicy luks --minlen=6 --minquality=50 --notstrict --nochanges --notempty
%end

3、centos8

  • CentOS-8.2.2004-x86_64-dvd1.iso
#version=RHEL8
ignoredisk --only-use=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
# Use graphical install
graphical
# Use CDROM installation media
cdrom
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=enp0s3 --onboot=off --ipv6=auto --no-activate
network  --hostname=localhost.localdomain
repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Root password
rootpw --iscrypted $6$SU87rVMTtdKvUSVD$4MZ4NYjBkqBhRvfVe1i8gcZSL6dCa9pM2vzY00GXU9N367a8mn6ijY3zYekmmQF6S/H7GLgF4efKGSgUNB1iR0
# X Window System configuration information
xconfig  --startxonboot
# Run the Setup Agent on first boot
firstboot --enable
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Shanghai --isUtc --nontp

%packages
@^graphical-server-environment
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

猜你喜欢

转载自blog.csdn.net/qq_26884501/article/details/112377876
ks
cfg
今日推荐