This article will show how to install Cobbler 2.6.11 (the last from the 2.6 branches) under Ubuntu 16.04 LTS. There is Cobbler package version 2.4.x in the Ubuntu 16 LTS, but Cobbler 2.4 is really old and some options and features are not available anymore, so installing from the Ubuntu package system Cobbler 2.4 would probably just waste your time and you will move to 2.6 or even later. In fact, Ubuntu 18 LTS removed the Cobbler packages at all and only manual install (aka installation from sources is only available or from an anonymous repository like PPA).
Here are the steps to install a working Cobbler 2.6 under Ubuntu 16.04 (Xenial Xerus).
Note: All commands are executed as root user, so it is much easier to just execute ones “sudo su” before you begin following the steps below.
STEP 1) Update your system to the latest state and install the Cobbler 2.6.11 dependencies
Update the system:
apt update apt upgrade -y
Install the Cobbler 2.6 dependencies:
apt install -y make git python-yaml python-cheetah python-netaddr python-simplejson libapache2-mod-wsgi python-django atftpd debmirror apache2 python-urlgrabber fence-agents isc-dhcp-server
STEP 2) Download and install the Cobbler 2.6.11 source
cd /root wget https://github.com/cobbler/cobbler/archive/v2.6.11.tar.gz tar xf v2.6.11.tar.gz cd cobbler-2.6.11 make install
This will install Cobbler and Cobbler web by replacing all configurations of old Cobbler install! The python files will be installed under “/usr/local”, so a big part of Cobbler will be installed in /usr/local/lib/python2.7/dist-packages/cobbler.
STEP 3) Enable Cobbler in apache2
a2enconf cobbler cobbler_web a2enmod proxy proxy_http rewrite ssl a2ensite default-ssl systemctl enable apache2
Enable apache2 configuration file for cobbler web, enable the apache2 modules and the default HTTPS apache2 virtual host, because the web interface won’t work with HTTP. Opening the Cobbler web interface using HTTP will result in forbidden error (HTTP error 403). The Cobbler web interface is limited to use HTTPS.
Keep on reading!