cat >/var/lib/cobbler/kickstarts/centos7.ks<<'EOF'# This kickstart file should only be used with EL > 5 and/or Fedora > 7.# For older versions please use the sample.ks kickstart file.# Install OS instead of upgradeinstall# Use text mode installtext# System keyboardkeyboard us# System languagelang en_US# System timezonetimezone Asia/ShangHai#Root passwordrootpw --iscrypted $default_password_crypted# System authorization informationauth --useshadow --enablemd5# Firewall configurationfirewall --disabled# SELinux configurationselinux --disabled# Use network installationurl --url=$tree# Clear the Master Boot Recordzerombr# System bootloader configurationbootloader --location=mbr# Partition clearing informationclearpart --all --initlabelpart /boot --fstype=xfs --size=500part swap --fstype=swap --size=2048part / --fstype=xfs --grow --size=200 # If any cobbler repo definitions were referenced in the kickstart profile, include them here.$yum_repo_stanza# Network information$SNIPPET('network_config')# Do not configure the X Window Systemskipx# Run the Setup Agent on first bootfirstboot --disable# Reboot after installationreboot%pre$SNIPPET('log_ks_pre')$SNIPPET('kickstart_start')$SNIPPET('pre_install_network_config')# Enable installation monitoring$SNIPPET('pre_anamon')%end%packages$SNIPPET('func_install_if_enabled')@core@basetreenmapwgetlftplrzsztelnet%end%post --nochroot$SNIPPET('log_ks_post_nochroot')%end%post$SNIPPET('log_ks_post')# Start yum configuration$yum_config_stanza# End yum configuration$SNIPPET('post_install_kernel_options')$SNIPPET('post_install_network_config')$SNIPPET('func_register_if_enabled')$SNIPPET('download_config_files')$SNIPPET('koan_environment')$SNIPPET('redhat_register')$SNIPPET('cobbler_register')# Enable post-install boot notification$SNIPPET('post_anamon')# Start final steps$SNIPPET('kickstart_done')# End final stepssed -ri "/^#UseDNS/c\UseDNS no" /etc/ssh/sshd_configsed -ri "/^GSSAPIAuthentication/c\GSSAPIAuthentication no" /etc/ssh/sshd_config%endEOF