Setup repository (/etc/apt/sources.list) - add following line
OR
use following command
Install Packages
apt-get -y install apache2 cobbler createrepo deb-mirror dnsmasq fence-agents libapache2-mod-proxy-html libapache2-mod-wsgi make python3-software-properties python-django python-lzma python-software-properties python-tk python-urlgrabber software-properties-common sshfs syrep syslinux testrepository tftp vim yum yum-utils
TURNOFF firewall
ufw disable
TURNOFF SELINUX
Enable Module
a2enmod xml2enc
Enable Configuration
a2enconf cobbler cobbler_web
IMPORT loaders
cobbler get-loaders;
service cobblerd restart;
cobbler sync;
Restart Cobblerd and sync
service cobblerd restart;
cobbler sync;
Check cobbler config
cobbler check;
set 'server:' 'next_server:' varriable with current IP address of the server in /etc/cobbler/settings
IP_ETH0=$(ifconfig eth0 | grep 'inet addr:' | cut -d":" -f2 | cut -d" " -f1)
sudo sed -i "s/127\.0\.0\.1/${IP_ETH0}/" /etc/cobbler/settings
set the SECRET_KEY for django cobbler_web app
SECRET_KEY=$(python -c 'import re;from random import choice; import sys; sys.stdout.write(re.escape("".join([choice("abcdefghijklmnopqrstuvwxyz0123456789^&*(-_=+)") for i in range(100)])))')
sudo sed --in-place "s/^SECRET_KEY = .*/SECRET_KEY = '${SECRET_KEY}'/" /usr/share/cobbler/web/settings.py
SET THE password for /etc/cobbler/settings
openssl passwd -1 -salt 'random' 'passwrd-here'
set 'manage_dhcp:' 'manage_dns:' 'manage_tftpd' /etc/cobbler/modules.conf
Use the dnsmasq for dns, dhcp and tftpd
Configure the dnsmasq.template (setup DNS, DHCP, TFTP)
vim /etc/cobbler/dnsmasq.template
# Cobbler generated configuration file for dnsmasq
# Usage logging (use this for debug only !)
tftp-root=/var/lib/tftpboot
addn-hosts = /var/lib/cobbler/cobbler_hosts
# # Be a proxyDHCP server
dhcp-range=10.31.99.150,proxy
# Only respond to clients that are known (i.e present in /etc/ethers)
# Set this (and domain: see below) if you want to have a domain
# automatically added to simple names in a hosts-file.
# Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server.
pxe-service=x86PC, "Boot PXELinux (=Cobbler controlled)", pxelinux ,$next_server
#dhcp-range=10.31.99.150,10.31.99.254
dhcp-option=3,$next_server
dhcp-boot=net:normalarch,pxelinux.0
dhcp-boot=net:ia64,$elilo
$insert_cobbler_system_definitions
Cobbler IMPORT Fedora 22 distro, repo and reposync
sudo mount -o loop /tmp/Fedora-Server-DVD-x86_64-22.iso /mnt/iso/
sudo cobbler import --path=/mnt/iso --name=fc22 --kickstart=/tmp/eris-ks.cfg
cobbler reposync --only=fc22-everything-64
CHECK ports
netstat -tulpn