This page describes how to configure CentOS 6.3 as an Anaconda & Kickstart PXE boot and install server. The following guide outlines the details for setting up both CentOS 6.3 x86_64 and CentOS 6.3 i386 on the same server. With a bit more effort, it is also possible to install other Enterprise Linux versions using the same install server (e.g. CentOS 5.8 or any version of Red Hat Enterprise Linux).
Step 1) Download the CentOS DVD ISOs
o Keep these available, you'll need them again later in this process.
Step 2) Install CentOS 6.3
o This will be the anaconda / kickstart server.
o Start with a 'minimal' install.
o Make sure to have at least 40GB of free space on / or mounted as /export.
o This guide uses yum to install the required additional packages.
o Internet (or a Satellite Server) access isn't necessarily required, but it does make it easier.
o In lieu of Internet/Satellite access, you could use rpm to install the required packages, but it's more difficult and you will have to install all dependent packages manually.
Step 3) Configure the network interface(s)
o Don't use dhcp for the anaconda / kickstart server's network interface.
o Configure /etc/resolv.conf and /etc/nsswitch.conf appropriately for your environment.
o Remember to check that Internet (or Satellite Server) access works (e.g. yum makecache)
-- begin example /etc/sysconfig/network-scripts/ifcfg-eth1--
-- end example /etc/sysconfig/network-scripts/ifcfg-eth0--
Step 4) Disable iptables
o This isn’t absolutely necessary, it’s just easier.
Step 5) Disable selinux
· Again, not necessary but easier.
-- begin example /etc/selinux/config--
-- end example /etc/selinux/config--
Step 6) Install required packages
Step 7) Create the anaconda directory structure
Step 8) Enable anaconda tftp boot via xinetd
-- begin example /etc/xinetd.d/tftp--
-- end example /etc/xinetd.d/tftp--
Step 9) Configure the DHCP server
o Note that the example dhcpd.conf below is not authoritative.
o For PXE boot to work, you must enter the correct hardware ethernet (MAC) address for each of the clients you want to kickstart.
o This could be changed to authoritative for a given subnet, but it's safer to prevent *any* client from obtaining an IP address from this dhcp server.
o Once a client is installed via kickstart, be sure to remove (or change) the MAC address in dhcpd.conf so it doesn't accidentally get re-installed.
o Preventing fully automatic installs is generally a good practice.
-- begin example /etc/dhcp/dhcpd.conf--
-- end example /etc/dhcp/dhcpd.conf--
Step 10) Copy the CentOS DVD media
o Use the ISOs downloaded earlier. Or, download them again.
o (somehow) Copy them to /export/anaconda/iso/CentOS, e.g.
Once the ISOs exist in /export/anaconda/iso/CentOS on the server ...
Step 11) Configure default boot menu
o Adding the default option to boot to rescue mode can avoid fully automatic (accidental) installs.
o Manual selection of the correct installation / kickstart configuration profile is my best practice.
-- begin example /export/anaconda/tftpboot/pxelinux.cfg/default--
-- end example /export/anaconda/tftpboot/pxelinux.cfg/default--
Step 12) Configure /etc/httpd/conf.d/anaconda.conf
-- begin example /etc/httpd/conf.d/anaconda.conf--
-- end example /etc/httpd/conf.d/anaconda.conf--
Step 13) Customize kickstart configuration files
o These are working examples, but you should tailor them to your individual needs.
-- begin example /export/anaconda/cfg/CentOS-6.3-x86_64-ks.cfg--
-- end example /export/anaconda/cfg/CentOS-6.3-x86_64-ks.cfg--
-- begin example /export/anaconda/cfg/CentOS-6.3-i386-ks.cfg--
-- end example /export/anaconda/cfg/CentOS-6.3-i386-ks.cfg--
Step 15) Finish configuring the PXE boot environment
Step 16) Enable services
Step 17) PXE Boot the install clients
o Different hardware manufacturers have different methods for invoking PXE network booting.
o Make sure to verify the client’s MAC address is in /etc/dhcp/dhcpd.conf and that you’ve restarted dhcpd (e.g. service dhcpd restart).
o If everything’s correct then you should see screens similar to the following screen shots.