1. Installing Cobbler
(1). Packages required to install third-party repositories
#cd/tmp
#wget http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
#rpm-IVH epel-release-6-8.noarch.rpm
(2). Install DHCP
#yum-y Install DHCP
(3). Install Other related software
#yum-y install tftp rsync xinetd httpd
(4). Install Cobbler
#yum-y Install Cobbler
2. Turn off SELinux and firewalls
#setenforce 0
#service iptables Stop
3. Start Cobbler and related services
#service httpd Start
#chkconfig httpd on
#service Cobblerd Start
#chkconfig Cobblerd on
4. Set Cobbler
(1). Cobbler Check
The following message appears when you are finished executing
The following is potential configuration items and that's want to fix:
1:the ' server ' field in/etc/cobbler/settings must is set to something other than localhost, or kickstarting features WI ll not work. This should is a resolvable hostname or IP for the boot server as reachable by all machines that would use it.
2:for PXE to be functional, the ' next_server ' field in/etc/cobbler/settings must is set to something other than 127.0.0 .1, and should match the IP of the boot server on the PXE network.
3:selinux is enabled. Review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
Https://github.com/cobbler/cobbler/wiki/Selinux
4:some network boot-loaders is missing from/var/lib/cobbler/loaders, you could run ' cobbler get-loaders ' to download the M, or, if you are want to handle x86/x86_64 netbooting, your may ensure so you have installed a *recent* version of the Syslinux package installed and can ignore this message entirely. Files in this directory, should want to support all architectures, should include pxelinux.0, MENU.C32, Elilo.efi, and Yaboot. The ' Cobbler get-loaders ' command is the easiest-to resolve these requirements.
5:change ' disable ' to ' no ' in/etc/xinetd.d/rsync
6:debmirror package isn't installed, it'll be required to manage Debian deployments and repositories
7:ksvalidator is not found, install Pykickstart
8:the default password used by the sample templates for newly installed machines (default_password_crypted IN/ETC/COBBL Er/settings) is still set to ' cobbler ' and should be changed, try: "OpenSSL passwd-1-salt ' Random-phrase-here ' Your-pas Sword-here ' "To generate new one
9:fencing tools were not found, and is required to use the (optional) power management features. Install Cman or fence-agents to use them
Restart Cobblerd and then run ' Cobbler Sync ' to apply changes.
(2). Modify as required
Description of the next 1 how to do
Modify the server parameter in this/etc/cobbler/settings configuration file to be the IP
Description of the next 2 how to do
Modify the Next_server parameter in this/etc/cobbler/settings configuration file to the IP of this server
Description of the next 3 how to do
If you start the SELinux security thing, you need to shut it down.
#setenforce 0
or modify the selinux=disabled in the configuration file/etc/selinux/config, this step requires a restart of the operating system
Description of the next 4 how to do
#cobbler get-loaders
Description of the next 5 how to do
Modify Disable = No in configuration file/etc/xinetd.d/rsync
Description of the next 6 how to do (actually 6 can not do)
#yum-y install ed patch perl perl-digest-sha1 Perl-libwww-perl perl-compress-zlib perl-lockfile-simple
#rpm-IVH debmirror-20090807-1.el5.noarch.rpm
#vim/etc/debmirror.conf
Note the following two lines
# @dists = "Sid";
# @arches = "i386";
Description of the next 7 how to do
#yum-y Install Pykickstart
Description of the next 8 how to do
To modify the default password for the cobbler user, you can use the following command to generate a password and replace the password in/etc/cobbler/settings with the generated password to find this line default_password_crypted
Here is the command to generate the password
#openssl passwd-1-salt ' daoke ' Mirrtalk '
will generate the following password
$1$daoke$p2t8sddadwh.qoeqiueur/
Replace can
During the modification process, use cobbler Check to see all the issues resolved
(3) Restart the cobbler and apply all settings
#service cobblerd Restart
#cobbler Sync
5. Modify the DHCP template, make sure that the DHCP assigned address and cobbler in the same network segment, remember to modify/etc/cobbler/settings parameters Manage_dhcp set to 1, in order to manage DHCP
Vim/etc/cobbler/dhcp.template
# ******************************************************************
# 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'll be
# overwritten.
#
# ******************************************************************
Ddns-update-style Interim;
Allow booting;
Allow BOOTP;
Ignore client-updates;
Set vendorclass = option Vendor-class-identifier;
Option Pxe-system-type code = unsigned integer 16;
Subnet 192.168.5.0 netmask 255.255.255.0 {
Option routers 192.168.5.2;
Option Domain-name-servers 192.168.5.2;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 192.168.5.110 192.168.5.220;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server $next _server;
Class "Pxeclients" {
Match if substring (option vendor-class-identifier, 0, 9) = "Pxeclient";
If option Pxe-system-type = 00:02 {
FileName "Ia64/elilo.efi";
} else if option Pxe-system-type = 00:06 {
FileName "Grub/grub-x86.efi";
} else if option Pxe-system-type = 00:07 {
FileName "Grub/grub-x86_64.efi";
} else {
FileName "pxelinux.0";
}
}
}
#for Dhcp_tag in $dhcp _tags.keys ():
# # Group could is subnet if your DHCP tags line up with your subnets
# # or really any valid dhcpd.conf construct ... if you
# # Default DHCP tag in cobbler, the group block can is deleted for a
# # Flat Configuration
# Group for Cobbler DHCP tag: $dhcp _tag
Group {
#for mac in $dhcp _tags[$dhcp _tag].keys ():
#set iface = $dhcp _tags[$dhcp _tag][$mac]
Host $iface. Name {
Hardware Ethernet $mac;
#if $iface. IP_Address:
Fixed-address $iface. ip_address;
#end If
#if $iface. Hostname:
Option Host-name "$iface. hostname";
#end If
#if $iface. Netmask:
Option Subnet-mask $iface. netmask;
#end If
#if $iface. Gateway:
Option routers $iface. Gateway;
#end If
#if $iface. ENABLE_GPXE:
If exists user-class and option User-class = "Gpxe" {
FileName "http:/$cobbler _server/cblr/svc/op/gpxe/system/$iface. Owner";
} else if exists user-class and option User-class = "Ipxe" {
FileName "http:/$cobbler _server/cblr/svc/op/gpxe/system/$iface. Owner";
} else {
FileName "Undionly.kpxe";
}
#else
FileName "$iface. FileName";
#end If
# # Cobbler defaults to $next _server, but some users
# # $iface. System.server for proxied setups
Next-server $next _server;
# # Next-server $iface. Next_server;
}
#end for
}
#end for
Attention!!!!
Vim/etc/dhcp/dhcpd.conf
Ddns-update-style Interim;
Allow booting;
Allow BOOTP;
Ignore client-updates;
Set vendorclass = option Vendor-class-identifier;
Option Pxe-system-type code = unsigned integer 16;
Subnet 192.168.5.0 netmask 255.255.255.0 {
Option routers 192.168.5.2;
Option Domain-name-servers 192.168.5.2;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 192.168.5.110 192.168.5.220;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server 192.168.5.132;
Class "Pxeclients" {
Match if substring (option vendor-class-identifier, 0, 9) = "Pxeclient";
If option Pxe-system-type = 00:02 {
FileName "Ia64/elilo.efi";
} else if option Pxe-system-type = 00:06 {
FileName "Grub/grub-x86.efi";
} else if option Pxe-system-type = 00:07 {
FileName "Grub/grub-x86_64.efi";
} else {
FileName "pxelinux.0";
}
}
}
Group {
}
Start DHCP and boot automatically
#service DHCPD Start
#chkconfig DHCPD on
6. Mount the centos6.5 installation disk and create the installation image
#mkdir/mnt/mirrtalk65miso/
#mount-O loop/data/mirrtalk-6.5-x86_64-minimal.iso/mnt/mirrtalk65miso/
#cobbler Import--path=/mnt/mirrtalk65miso/--name=mirrtalk-6.5-x86_64--arch=x86_64
View the imported
#cobbler distro List
#cobbler List
#cobbler Report
7. Modify MIRRTALK65MISO.KS
#vim/VAR/LIB/COBBLER/KICKSTARTS/MIRRTALK65MISO.KS
Auth--useshadow--enablemd5
Bootloader--LOCATION=MBR
Clearpart--all--initlabel
Text
Firewall--disabled
Firstboot--disabled
Keyboard US
Lang en_US. UTF-8
Network--onboot Yes--bootproto DHCP--noipv6
URL--url= $tree
$yum _repo_stanza
Reboot
ROOTPW Mirrtalk
SELinux--disabled
Skipx
TimeZone--UTC Asia/shanghai
Install
ZEROMBR Yes
Part/boot--fstype ext4--size=200--asprimary
Part/--fstype Ext4--size=102400
Part swap--size=16384
Part/data--fstype ext4--size=100--grow
Reboot
%packages
@core
@server-policy
@workstation-policy
%end
8. Modify the Display interface
#vim/var/lib/tftpboot/pxelinux.cfg/default
DEFAULT Menu
PROMPT 0
MENU TITLE Cobbler | http://www.cobblerd.org/
TIMEOUT 200
Totaltimeout 6000
OnTimeOut Local
LABEL mirrtalk-6.5-x86_64
Kernel/images/mirrtalk-6.5-x86_64/vmlinuz
MENU LABEL mirrtalk-6.5-x86_64
Append initrd=/images/mirrtalk-6.5-x86_64/initrd.img ksdevice=bootif lang= kssendmac text ks=http://192.168.5.132/ Cblr/svc/op/ks/profile/mirrtalk-6.5-x86_64
Ipappend 2
MENU End
Restart related services
#/etc/init.d/xinetd restart
#/etc/init.d/cobblerd restart
Specify the KS file for a profile
#cobbler profile Add--name=mirrtalk-6.5-x86_64 kickstart=/var/lib/cobbler/kickstarts/mirrtalk65miso.ks
#cobbler profile Edit--name=mirrtalk-6.5-x86_64 KICKSTART=/VAR/LIB/COBBLER/KICKSTARTS/MIRRTALK65MISO.KS
9. Restart
#/etc/init.d/cobblerd restart
This article is from the "Menglong" blog, make sure to keep this source http://19871124.blog.51cto.com/624660/1431394