For this tutorial, we assume we wish to automate the installation of a CentOS Server using the Kickstart
Step 1: Setup of CentOS Server and looking at Anaconda Config File
- Just follow the typical setup of a Clean CentOS Server. Just insert the DVD in, follow the easy to follow steps to install.
- Once you have completed, you will notice that the Anaconda, the Red Hat Installation system saves a copy of the installation setup config file that was created by your installation choices to /root/ks-anaconda.cfg
- You can use this file /root/ks-anaconda.cfg to create another identical machine
- You can also use it to restore a machine to the original OS and then port the backup on top back.
Step 2: Setting up a On Demand Kickstart Server
- Create a folder “kickstart” on the root of the web server (/var/www/html/kickstarts)
- Copy /root/ks-anaconda.cfg to /var/www/html/kickstarts
- Rename the ks-anaconda.cfg to base.cfg (or any name you wish)
- Change the permission so that it can be read by the web server
# chmod 744 base.cfg
- Tweak the base.cfg
- Edit base.cfg….. Uncomment out the lines
clearpart --linux --drives=sda part /boot --fstype ext3 --size=100 --ondisk=sda part pv.3 --size=0 --grow --ondisk=sda volgroup VolGroup00 --pesize=32768 pv.3 logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=1000 --grow --maxsize=5952
- Edit base.cfg . If you are using Static IP Addresses
network --device eth0 --bootproto static --ip 192.168.1.2 --netmask 255.255.255.0 --gateway 192.168.1.1 --nameserver 192.168.1.100,192.168.101 --hostname mylinux.homelinux.org
- Change the Installation Method.
On the 2nd line of base.cfg, change the original “cdrom” to the web installurl --url=http://url-to-web-install-server/CentOS-6.8 .... .... .... repo --name="CentOS" --baseurl="http://url-to-web-install-server/CentOS-6.8"
- If you wish to disable selinux especially if you are setting up a cluster
selinux --disabled
- See Basic Kickstart on CentOS 5 (Part 2) for the the rest of the tutorial….