Download the epel packages from: http://fedoraproject.org/wiki/EPEL

Edit the files: /etc/yum.repos.d/epel-repo and /etc/yum.repos.d/epel-testing.repo

Uncomment the following line:

#baseurl=http://

Comment the following line (Otherwise yum won’t find the epel packages and won’t work properly.):

mirrorlist=http://

Install cobbler:

yum install cobbler policycoreutils-python-2.0.83-19.18.el6.i686

Install mod_python for apache

yum install mod_python

Install dhcp

yum install dhcp

Install syslinux and syslinux-tftpboot

yum install syslinux syslinux-tftpboot

Cobbler and SELinux don’t play nice together. Whilst it is possible to configure cobbler to work with selinux, it is easier to disable it altogether. Reboot the server after editing the file:

vi /etc/selinux/config
SELINUX=disabled

Configure the /etc/hosts file to include a local hostname

192.168.1.1  puppet puppet.localdomain

Start cobbler daemon:

/etc/init.d/cobblerd start

Restart apache

/etc/init.d/httpd restart

Perform a cobbler check, and address any issues which are shown

cobbler check

After the issues have been rectified, restart cobbler and do a ‘cobbler sync’

/etc/init.d/cobblerd restart && cobbler sync

Do another ‘cobbler check’ to ensure that all issues have been resolved. Ignore the step to do ‘cobbler get loaders’ – This is not required. Everything we need will be installed as part of the syslinux and syslinux-tftpboot packages.

On the server I was working on, eth1 was reserved for the Kickstart network. I therefore allowed all traffic through this interface in my iptables ruleset, like this:

INT_INT="eth1"
$IPTABLES -A INPUT -i $INT_INT -j $ACCEPT
$IPTABLES -A OUTPUT -o $INT_INT -j $ACCEPT

I also needed to make sure that connections to my webserver (listening on 192.168.1.1) weren’t going to be routed through the proxy. To acheive this, I added the NO_PROXY environment variable to my proxy script, which now looks like this:

cat /etc/profile.d/proxy.sh

#!/bin/bash
export HTTP_PROXY=http://10.9.1.80:8080/
export http_proxy=http://10.9.1.80:8080/
export FTP_PROXY=http://10.9.1.80:8080/
export ftp_proxy=http://10.9.1.80:8080/
export NO_PROXY=localhost,127.0.0.1,192.168.1.1
export no_proxy=localhost,127.0.0.1,192.168.1.1

Copied the CentOS 5.4 ISO image (on the Cobbler / KS Server) into: /opt/iso

Mount the CentOS ISO:

mkdir /mnt/centos5.4
mount -o loop /opt/iso/CentOS-5.4-i386-bin-DVD.iso /mnt/centos5.4/

Import the Client OS into cobbler (this takes a while):

cobbler import --path=/mnt/centos5.4/ --name=CentOS5.4 --arch=i386

Set up a Kickstart file, I used system-config-kickstart:

yum install system-config-kickstart
system-config-kickstart

Within the kickstart file, you will need to set the URL value to something like this:

url --url="http://192.168.1.1/cobbler/ks_mirror/CentOS5.4-i386/"

Associate the kickstart file with this profile

cobbler profile edit --name=CentOS5.4-i386 --kickstart=/opt/ks.cfg/CentOS5.4-i386.ks.cfg

Enable cobbler dhcp management

vi /etc/cobbler/settings
# set to 1 to enable Cobbler's DHCP management features.
# the choice of DHCP management engine is in /etc/cobbler/modules.conf
manage_dhcp: 1

Restart Cobbler and do a ‘cobbler sync’ after enabling dhcp management

/etc/init.d/cobblerd restart && cobbler sync

Register a client machine with cobbler

cobbler system add --name=client_a --mac=08:00:27:DB:8A:9F --ip=192.168.1.2 --profile=CentOS5.4-i386 --netboot-enabled=true

In order that you can log into the web interface at http://localhost/cobbler_web change the authentication option in the file /etc/cobbler/modules conf, so it looks like this:

[authentication]
module = authn_configfile