Difference between revisions of "Cobbler installation on CentOS/RHEL"
| Line 1: | Line 1: | ||
| − | + | == Pre-Requisits == | |
For this installation, we will need to have the following services installed: '''dhcp''', '''bind''' & '''apache'''. | For this installation, we will need to have the following services installed: '''dhcp''', '''bind''' & '''apache'''. | ||
| Line 12: | Line 12: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Adding the EPEL Repo to get cobbler == | |
Download '''http://mirrors.coreix.net/fedora-epel/5/i386/epel-release-5-4.noarch.rpm''' (or whatever is suitable for the installed OS): | Download '''http://mirrors.coreix.net/fedora-epel/5/i386/epel-release-5-4.noarch.rpm''' (or whatever is suitable for the installed OS): | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 22: | Line 22: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Install cobbler == | |
Install using yum: | Install using yum: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 28: | Line 28: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Check apache is working == | |
Restart '''httpd''': | Restart '''httpd''': | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 38: | Line 38: | ||
Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf: | Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf: | ||
Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration | Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration | ||
| − | + | [FAILED] | |
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 55: | Line 55: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Add a few more packages to satisfy some cobbler requirements == | |
Install '''debmirror''' with yum (needed to manage debian deployments): | Install '''debmirror''' with yum (needed to manage debian deployments): | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 66: | Line 66: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Edit xinet.d/rsync file == | |
Edit '''/etc/xinetd.d/rsync''' and change '''disable''' to '''no''': | Edit '''/etc/xinetd.d/rsync''' and change '''disable''' to '''no''': | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 81: | Line 81: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Edit /etc/debmirror.conf for proper Debian support == | |
Edit '''/etc/debmirror.conf''' and comment '''dists''' and '''arches''' lines: | Edit '''/etc/debmirror.conf''' and comment '''dists''' and '''arches''' lines: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
| Line 98: | Line 98: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| − | + | == Configure cobbler == | |
Get cobbler to manage '''dhcp''' and '''dns''' by setting the following in '''/etc/cobbler/settings''': | Get cobbler to manage '''dhcp''' and '''dns''' by setting the following in '''/etc/cobbler/settings''': | ||
<syntaxhighlight> | <syntaxhighlight> | ||
Revision as of 15:41, 3 July 2012
Pre-Requisits
For this installation, we will need to have the following services installed: dhcp, bind & apache.
Install with the following yum command:
yum install httpd dhcp bindIf necessary, the dhcpd service can be restricted to servicing dhcp requests on just one port. To do this, edit the /etc/sysconfig/dhcpd file and set the following line:
DHCPDARGS=eth1Adding the EPEL Repo to get cobbler
Download http://mirrors.coreix.net/fedora-epel/5/i386/epel-release-5-4.noarch.rpm (or whatever is suitable for the installed OS):
wget http://mirrors.coreix.net/fedora-epel/5/i386/epel-release-5-4.noarch.rpmAnd install:
rpm -ivh epel-release-5-4.noarch.rpmInstall cobbler
Install using yum:
yum install cobbler cobbler-webCheck apache is working
Restart httpd:
service httpd restartThe following error might occur:
Starting httpd: Syntax error on line 10 of /etc/httpd/conf.d/cobbler.conf:
Invalid command 'WSGIScriptAliasMatch', perhaps misspelled or defined by a module not included in the server configuration
[FAILED]If this error occurs, firstly remove mod_python:
rpm -e mod_pythonThen, create a mod_wsgi config file:
cat > /etc/httpd/conf.d/05-load-wsgi.conf
LoadModule wsgi_module modules/mod_wsgi.soAnd finally restart apache:
service httpd restartAdd a few more packages to satisfy some cobbler requirements
Install debmirror with yum (needed to manage debian deployments):
yum install debmirrorInstall pykickstart with yum (A python library for manipulating kickstart files):
yum install pykickstartEdit xinet.d/rsync file
Edit /etc/xinetd.d/rsync and change disable to no:
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}Edit /etc/debmirror.conf for proper Debian support
Edit /etc/debmirror.conf and comment dists and arches lines:
# Download options
$host="ftp.debian.org";
$user="anonymous";
$passwd="anonymous@";
$remoteroot="/debian";
$download_method="ftp";
# @dists="sid";
@sections="main,main/debian-installer,contrib,non-free";
# @arches="i386";
# @extra_dirs="";
# @ignores="";
. . . . .Configure cobbler
Get cobbler to manage dhcp and dns by setting the following in /etc/cobbler/settings:
manage_dhcp: 1
manage_dns: 1Set server ip addresses in /etc/cobbler/settings:
next_server: 172.28.0.100
server: 172.28.0.100Confirm the following are set in /etc/cobbler/modules.conf:
[dns]
module = manage_bind
[dhcp]
module = manage_iscEdit /etc/cobbler/dhcp.template with relevant network information (for example):
# ******************************************************************
# Cobbler managed dhcpd.conf file
#
# generated from cobbler dhcp.conf template ($date)
# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
# overwritten.
#
# ******************************************************************
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
subnet 172.28.0.0 netmask 255.255.0.0 {
option routers 172.28.0.100;
option domain-name-servers 10.0.0.1;
option subnet-mask 255.255.0.0;
range dynamic-bootp 172.28.0.101 172.28.0.200;
filename "/pxelinux.0";
default-lease-time 604800;
max-lease-time 604800;
next-server 172.28.0.100;
}
. . . . .Attempt to start dhcpd:
service dhcpd restartNB: if the dhcpd service isn't running and it fails to start, it may be because the default /etc/dhcpd.conf file is blank. Enter the above information and start the dhcpd service (it needs to be running for cobbler sync (below) to complete fully). The content of /etc/dhcpd.conf will be overwritten with the contents of /etc/cobbler/dhcp.template once cobbler sync has been performed.
Run cobbler check:
cobbler checkRun cobbler sync:
cobbler sync