CobblerasapreparatorytooltomakedeploymenteasierRedHat/Centos/Fedorasystem,butalsotosupportthedeploymentofSuseandDebiansystem.
Itprovidesthefollowingservicesintegration:

*PXEservicesupport
*DHCPServiceManager,
*DNSServiceManagement
*Kickstartservicesupport
*YumWarehouseManagement?xml:namespace>

1Closetheselinuxandiptablesinstalltheepelpackages

32位 

rpm-Uvhhttp://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

64

rpm-Uvhhttp://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm[rhel5.x]

#rpm-Uvhhttp://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm[rhel6.x]

rpm-ivhepel-release-5-4.noarch.rpm

2、yuminstall

yum-yinstallcobblerhttpdrsynctftp-serverxinetddhcppython-ctypespykickstartcman

#Cobblerconfigurationfilein/var/lib/cobbler/and/etc/cobbler(differentversionsmayvary)
#Xinetdtftp-servertodothetftpserver,pxebootrequires.
#HttpdserverstorageksfileandinstallCD-ROM.TheNote/var/www/cobblerdirectorymusthaveenoughspacetoaccommodatetheLinuxinstallationfiles(mobile,builtsoftlinks


3cobblercheck

Thefollowingarepotentialconfigurationitemsthatyoumaywanttofix:

1:debmirrorpackageisnotinstalled,itwillberequiredtomanagedebiandeploymentsandrepositories
2:ksvalidatorwasnotfound,installpykickstart
3:fencingtoolswerenotfound,andarerequiredtousethe(optional)powermanagementfeatures.installcmanorfence-agentstousethem

4Changetheconfigurationtoapplytothecobblerrun

vi/etc/cobbler/settings
next_server:127.0.0.1replacednext_server:192.168.1.101{Note:ThisistheDHCPserviceaddress}
server:127.0.0.1replaceserver:192.168.1.101{Thisisthecobblerserviceaddress}
manage_dhcp:0replacemanage_dhcp:1{Note:ThisisbehindfortomakecobblerManagementdhcpwithStepupdateconfigurationinformation[cobblersync]}

5Toupdatefedoraloaderinformation,edittftpandrsync

cobblerget-loaders

[root@yum~]#vi/etc/xinetd.d/tftp
disable=yestodisable=no
[root@yum~]#vi/etc/xinetd.d/rsync
disable=yestodisable=no


6.[root@yum~]#opensslpasswd-1
Password:
Verifying-Password:
$1$eT1SEZGw$xuAvw1mQPy.DkNKdlN7nZ1
[root@yum~]#vi/etc/cobbler/settings
default_password_crypted:"$1$eT1SEZGw$xuAvw1mQPy.DkNKdlN7nZ1"

7Configurethedhcptemplatefile

[root@yum~]#vi/etc/cobbler/dhcp.template
subnet192.168.1.0netmask255.255.255.0{
optionrouters192.168.1.1;
optiondomain-name-servers202.96.209.133,8.8.8.8;
optionsubnet-mask255.255.255.0;
rangedynamic-bootp192.168.1.2192.168.1.254;
filename"/pxelinux.0";
default-lease-time21600;
max-lease-time43200;
next-server$next_server;

8Toimportdrivethemirror

[root@yum~]#mkdir-p/media/cdrom
[root@yum~]#mount/dev/cdrom/media/cdrom/
mount:blockdevice/dev/cdromiswrite-protected,mountingread-only
[root@yum~]#cobblerimport--path=/media/cdrom--name=CentOS5.8-64
taskstarted:2012-12-06_232504_import
taskstarted(id=Mediaimport,time=ThuDec623:25:042012)
Foundaredhatcompatiblesignature:CentOS
addingdistros
-Warning:Multiplearchsfound:['x86_64','i386']
creatingnewdistro:CentOS5.8-64-xen-x86_64
creatingnewprofile:CentOS5.8-64-xen-x86_64
creatingnewdistro:CentOS5.8-64-xen-i386
creatingnewprofile:CentOS5.8-64-xen-i386
-Warning:Multiplearchsfound:['x86_64','i386']
creatingnewdistro:CentOS5.8-64-x86_64
creatingnewprofile:CentOS5.8-64-x86_64
creatingnewdistro:CentOS5.8-64-i386
creatingnewprofile:CentOS5.8-64-i386
associatingrepos
traversingdistroCentOS5.8-64-xen-x86_64
descentinto/var/www/cobbler/ks_mirror/CentOS5.8-64
processingrepoat:/var/www/cobbler/ks_mirror/CentOS5.8-64
needtoproce***epo/comps:/var/www/cobbler/ks_mirror/CentOS5.8-64
lookingfor/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/*comps*.xml
running:createrepo-ccache-ssha--groupfile/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/comps.xml/var/www/cobbler/ks_mirror/CentOS5.8-64
3496/3496-CentOS/gpm-1.20.1-74.1.i386.rpmx86_64.rpm
SavingPrimarymetadata
Savingfilelistsmetadata
Savingothermetadata

receivedonstderr:Thisoptionisdeprecated

traversingdistroCentOS5.8-64-xen-i386
descentinto/var/www/cobbler/ks_mirror/CentOS5.8-64
processingrepoat:/var/www/cobbler/ks_mirror/CentOS5.8-64
needtoproce***epo/comps:/var/www/cobbler/ks_mirror/CentOS5.8-64
lookingfor/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/*comps*.xml
running:createrepo-ccache-ssha--groupfile/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/comps.xml/var/www/cobbler/ks_mirror/CentOS5.8-64
3496/3496-CentOS/gpm-1.20.1-74.1.i386.rpmx86_64.rpm
SavingPrimarymetadata
Savingfilelistsmetadata
Savingothermetadata

receivedonstderr:Thisoptionisdeprecated

traversingdistroCentOS5.8-64-x86_64
descentinto/var/www/cobbler/ks_mirror/CentOS5.8-64
processingrepoat:/var/www/cobbler/ks_mirror/CentOS5.8-64
needtoproce***epo/comps:/var/www/cobbler/ks_mirror/CentOS5.8-64
lookingfor/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/*comps*.xml
running:createrepo-ccache-ssha--groupfile/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/comps.xml/var/www/cobbler/ks_mirror/CentOS5.8-64
3496/3496-CentOS/gpm-1.20.1-74.1.i386.rpmx86_64.rpm
SavingPrimarymetadata
Savingfilelistsmetadata
Savingothermetadata

receivedonstderr:Thisoptionisdeprecated

traversingdistroCentOS5.8-64-i386
descentinto/var/www/cobbler/ks_mirror/CentOS5.8-64
processingrepoat:/var/www/cobbler/ks_mirror/CentOS5.8-64
needtoproce***epo/comps:/var/www/cobbler/ks_mirror/CentOS5.8-64
lookingfor/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/*comps*.xml
running:createrepo-ccache-ssha--groupfile/var/www/cobbler/ks_mirror/CentOS5.8-64/repodata/comps.xml/var/www/cobbler/ks_mirror/CentOS5.8-64
3496/3496-CentOS/gpm-1.20.1-74.1.i386.rpmx86_64.rpm
SavingPrimarymetadata
Savingfilelistsmetadata
Savingothermetadata

receivedonstderr:Thisoptionisdeprecated

associatingkickstarts
***TASKCOMPLETE***

9Viewthelistofimports

cobblerdistrolist

10Synchronizationcobblerconfiguration

cobblersync

#cobblerautomaticallyinitialize,removestartupitems,andthenaccordingtothetemplatecopiesloaderfile.Thengeneratepxeconfigurationfile,

Generatedhcpconfigurationfile,andfinallyrestartthedhcpservice.

Atthispoint,youcanuseavirtualmachinetotestthecobblerinstalled.

11startserver

servicehttpdrestart

servicexinetdrestart

servicedhcpdrestart

servicecobblerdrestart

12Cobblertesttheinstallation

F12