Difference between revisions of "Cobbler installation on CentOS/RHEL"

From Define Wiki
Jump to navigation Jump to search
Line 1: Line 1:
===== Pre-Requisits =====
+
==== 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 13: Line 13:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
===== Adding the EPEL Repo to get cobbler =====
+
==== 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):
Line 24: Line 24:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
===== Install cobbler =====
+
==== Install cobbler ====
 +
 
 +
Install using yum:
 +
<syntaxhighlight>
 +
yum install cobbler cobbler-web
 +
</syntaxhighlight>
 +
 
 +
==== Check apache is working ====
 +
 
 +
Restart '''httpd''':
 +
<syntaxhighlight>
 +
service httpd restart
 +
</syntaxhighlight>
 +
 +
The following error might occur:
 +
<syntaxhighlight>
 +
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]
 +
</syntaxhighlight>
 +
 
 +
If this error occurs, firstly remove '''mod_python''':
 +
<syntaxhighlight>
 +
rpm -e mod_python
 +
</syntaxhighlight>
 +
Then, create a '''mod_wsgi''' config file:
 +
<syntaxhighlight>
 +
cat > /etc/httpd/conf.d/05-load-wsgi.conf
 +
LoadModule wsgi_module modules/mod_wsgi.so
 +
</syntaxhighlight>
 +
And finally restart apache:
 +
<syntaxhighlight>
 +
service httpd restart
 +
</syntaxhighlight>

Revision as of 15:20, 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 bind

If 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=eth1

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):

wget http://mirrors.coreix.net/fedora-epel/5/i386/epel-release-5-4.noarch.rpm

And install:

rpm -ivh epel-release-5-4.noarch.rpm

Install cobbler

Install using yum:

yum install cobbler cobbler-web

Check apache is working

Restart httpd:

service httpd restart

The 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_python

Then, create a mod_wsgi config file:

cat > /etc/httpd/conf.d/05-load-wsgi.conf
LoadModule wsgi_module modules/mod_wsgi.so

And finally restart apache:

service httpd restart