#version=DEVEL # System authorization information auth --enableshadow --passalgo=sha512 # Install OS instead of upgrade install # Use text mode install text # Firewall configuration firewall --disabled # 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 --addsupport=zh_CN.UTF-8 # Network information network --bootproto=dhcp --device=ens32 --ipv6=auto --activate network --bootproto=dhcp --hostname=localhost.localdomain # Reboot after installation reboot # Use network installation url --url="ftp://10.10.10.8/pub/centos7" # Root password rootpw --iscrypted $6$wMs2XpjOtuoxr4QT$LEmJQudthTstsMpmwpCMlBDa18gl46Pxz/mno8frFDfrCjmtn4gGiARuT.w2h4uBYjZYTM1NT/kp3R/Bpvr5c. # SELinux configuration selinux --disabled # System services services --enabled="chronyd" # Do not configure the X Window System skipx # System timezone timezone Asia/Shanghai --isUtc --ntpservers=ntp.aliyun.com user --name=luck --password=$6$SZL/XaPl/5jHo5N5$5JpEJ5ux3MkojAezB2dd/sJYawb1yyna1jrW2S7RzIh30dPSt2d60ps/ZdJRGHHwaHyscLoTT0JK7pJcbos.i0 --iscrypted --gecos="luck" # System bootloader configuration bootloader --location=mbr --boot-drive=sda # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel --drives=sda # Disk partitioning information part pv.86 --fstype="lvmpv" --ondisk=sda --size=20179 part /boot --asprimary --fstype="xfs" --ondisk=sda --size=300 --label=boot volgroup centos --pesize=4096 pv.86 logvol / --fstype="xfs" --grow --size=18127 --label="root" --name=root --vgname=centos logvol swap --fstype="swap" --size=2048 --name=swap --vgname=centos %post echo $(date "+%Y-%m-%d %H:%M:%S") "Start PXE Install" >> /root/post-pxe.log wget -O /root/pxe.sh ftp://10.10.10.8/pub/sh/pxe7.sh echo $(date "+%Y-%m-%d %H:%M:%S") "Finish Download post install script" >> /root/post-pxe.log chmod +x /root/pxe.sh && bash /root/pxe.sh echo $(date "+%Y-%m-%d %H:%M:%S") "Finish PXE Install" >> /root/post-pxe.log %end %packages @^minimal @core chrony curl wget %end %addon com_redhat_kdump --disable --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