Kickstart a CentOS installation
You can automate the installation of CentOS (and other RPM-based distros such as RHEL and Fedora) by using what are known as kickstart files. These are text files that contain instructions for the Anaconda installer. The instructions vary and can include language and localisation settings, the layout of the partitions as well as authentication information for the root user. You can also use kickstart files to select package groups and individual packages that you want to install.
You can use different kickstart files for installing different types of systems, such as a web server, a mail server or a graphical desktop. What makes the kickstart file so powerful is that it enables you to embed scripts that are executed at key stages of the install process. This means that you can automate a lot of the work that you’d normally do by hand and have the installer run all of those steps for you. For example, you can automatically restore files from a backup and modify yum’s configuration files to download updates from a local mirror instead of the CentOS servers.
When you install a CentOS machine, the Anaconda installer will save a kickstart file for that particular installation under /root/
anaconda-ks.cfg. You can use this file to install another system, identical to the one you’ve just installed. Furthermore, you can also use this kickstart file to customise and create your own files. The most convenient way is to use the graphical KickstartConfigurator tool ( seethe lastpage) that you can download and install with yum install system-config-kickstart . To use the kickstart file to start an installation, refer to the chapter on Kickstart installations in the RHEL documentation at https://access.redhat.com/ documentation/en-US/Red_Hat_Enterprise_ Linux/6/html/Installation_Guide/ s1-kickstart2-startinginstall.html.