[root@centos8 ~]#mkdir /var/www/html/ks/[root@centos8~]#vim /var/www/html/ks/centos6.cfginstalltext
reboot
url--url=http://10.0.0.8/centos/6/os/x86_64/
lang en_US.UTF-8keyboard us
network--onboot yes --device eth0 --bootproto dhcp --noipv6
rootpw--iscrypted $6$j9YhzDUnQVnxaAk8$qv7rkMcPAEbV5yvwsP666DXWYadd3jYjkA9fpxAo9qYotjGGBUclCGoP1TRvgHBpqgc5n0RypMsPTQnVDcpO01
firewall--disabled
authconfig--enableshadow --passalgo=sha512
selinux--disabled
timezone Asia/Shanghai
bootloader--location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"zerombr
clearpart--all --initlabel
part/boot --fstype=ext4 --size=1024part/ --fstype=ext4 --size=50000part/data --fstype=ext4 --size=30000part swap--size=2048
%packages
@core
@server-policy
@workstation-policy
autofs
vim-enhanced%end%post
useradd wangecho magedu | passwd --stdin wang &> /dev/null
mkdir /etc/yum.repos.d/bakmv /etc/yum.repos.d/*/etc/yum.repos.d/bak
cat > /etc/yum.repos.d/base.repo <
[base]
name=base
baseurl=file:///misc/cd
gpgcheck=0
EOF
%end
[root@centos8 ~]#vim /var/www/html/ks/centos7.cfg
install
xconfig --startxonboot
keyboard --vckeymap=us --xlayouts='us'
rootpw --iscrypted $6$0V7M8ctDRIVNIUTw$uQZ2EtfbtgpaW1MRS3CCMvt9Z145BUlYHchG4wlNCXSFAnm3W81twhWJhNQjl0HAPAxYq0I7lwJThaYkTRXNk0
url --url="http://10.0.0.8/centos/7/os/x86_64"
lang en_US
auth --useshadow --passalgo=sha512
text
firstboot --enable
selinux --disabled
skipx
ignoredisk --only-use=sda
firewall --disabled
network --bootproto=dhcp --device=eth0
reboot
timezone Asia/Shanghai --nontp
bootloader --append="crashkernel=auto" --location=mbr --boot-drive=sda
zerombr
clearpart --all --initlabel
part / --fstype="xfs" --ondisk=sda --size=102400
part /boot --fstype="xfs" --ondisk=sda --size=1024
part swap --fstype="swap" --ondisk=sda --size=2048
part /data --fstype="xfs" --ondisk=sda --size=51200
%packages
@^minimal
vim-enhanced
wget
curl
tree
%end
%post
useradd wang
echo centos | passwd --stdin wang
%end