Initial Configuration - sibe/cobbler GitHub Wiki
Installing Cobbler
Disable SELinux by editing /etc/selinux/config
and change SELinux=Enforcing
to SELinux=disabled
if you are not familiar with SELinux troubleshooting or modifying SELinux policy, then reboot your system.
In Red Hat flavours distributions, Cobbler package is hosted by the EPEL Repository. Download and install the repository with the following command:
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6.8.noarch.rpm
Install the tool and the dnsmasq
package, which we use for providing network parameters to clients. We also need to install the pykickstart
package to enable the kickstart validator. As the root user, issue the install command:
# yum -y install cobbler dnsmasq pykickstart
Once the packages are installed, start the necessary services:
# service cobblerd start
# service httpd start
To test whether Cobbler is running correctly, type cobbler check
. This command reports configuration points that might need adjustment. If you make changes following the suggestions, make sure to restart the cobblerd
service so the changes are applied.
Configuring Cobbler
The main Cobbler configuration file is /etc/cobbler/settings
. Open the file and set the following parameters:
manage_dhcp: 1
manage_dns: 1
manage_tftpd: 1
restart_dhcp: 1
restart_dns: 1
pxe_just_once: 1
next_server: <server's ip address>
server: <server's ip address>
The options manage_*
and restart _*
are self-explanatory. The option next _server
is used in the DHCP configuration file to tell the machines what is the address of the server that provides the boot file. The option server
is used during the machine installation to refer to the Cobbler server address.
Finally, the option pxe_just_once
prevents installation loops in machines that are configured to always boot from the network. When this option is activated, the machine tells Cobbler that the installation is finished. Cobbler changes the netboot flag of the system object to false, forcing the machine to boot from the local disk.
Using dnsmasq
for DHCP and DNS is a good idea because configuring it is easy. Use in.tftpd
because it's the system default.
Edit the file /etc/cobbler/modules.conf
with following the settings:
[dns]
module = manage_dnsmasq
[dhcp]
module = manage_dnsmasq
[tftpd]
module = manage_in_tftpd
Cobbler uses a template to create the configuration files for the services. Editing the dnsmasq template at /etc/cobbler/dnsmasq.template
is necessary to adjust network information such as the gateway address and IP range to be used.
Assume the server that runs Cobbler is also the gateway, and our IP range is 10.1.2.100-10.1.2.199, enter this line in the file:
dhcp-range=10.1.2.100,10.1.2.199,255.255.255.0
The content of /etc/cobbler/dnsmasq.template
file:
# Cobbler generated configuration file for dnsmasq
# $date
#
# resolve.conf..?
#no-poll
#enable-dbus
read-ethers
addn-hosts = /var/lib/cobbler/cobbler_hosts
dhcp-range=10.1.2.100,10.1.2.199,255.255.255.0
dhcp-ignore=tag:!known
dhcp-option=3,$next _server
dhcp-lease-max=1000
dhcp-authoritative
dhcp-boot=pxelinux.0
dhcp-boot=net:normalarch,pxelinux.0
dhcp-boot=net:ia64,$elilo
$insert_cobbler_system_definitions
Restart the service and synchronize the changes to the filesystem for them to take effect.
# service cobblerd restart
# cobbler sync
Restart the xinetd
service to make TFTP available:
# service xinetd restart
Follow the next section to add distributions and repositories, create profiles, and register systems.