#platform=x86, AMD64, Intel EM64T #version=DEVEL # Install OS instead of upgrade install # Keyboard layouts keyboard 'us' # Root password rootpw --iscrypted #这里是加密的root用户密码 # System language lang zh_CN # System authorization information auth --useshadow --passalgo=sha512 # Use graphical install graphical # SELinux configuration selinux --enforcing # Do not configure the X Window System skipx # Firewall configuration firewall --enabled --ssh --service=ssh # Network information network --bootproto=dhcp --device=eth0 --ipv6=auto --activate --hostname=hbfucentos79 # Reboot after installation reboot # System services services --enabled="chronyd" # System timezone timezone Asia/Shanghai --isUtc --ntpservers=0.centos.pool.ntp.org,1.centos.pool.ntp.org,2.centos.pool.ntp.org,3.centos.pool.ntp.org # Use network installation url --url="http://服务器IP/cblr/links/CentOS-7-x86_64/" # System bootloader configuration bootloader --location=mbr # Clear the Master Boot Record zerombr # Partition clearing information clearpart --all --initlabel # Disk partitioning information part /boot --fstype="xfs" --size=1024 part swap --fstype="swap" --size=8192 part / --fstype="xfs" --grow --size=1 %packages @^minimal @core chrony kexec-tools openssl-devel openssh openssh-server net-tools curl vim wget %end %post sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \ -e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' \ -i.bak \ /etc/yum.repos.d/CentOS-*.repo sudo yum clean all sudo yum makecache sudo yum update -y %end