Cobbler Introduction
Cobbler is a fast network-installed Linux service, and can be adjusted to support network installation of Windows. The tool is developed using Python, small and lightweight (15k lines of code), with simple commands to complete the configuration of the PXE network installation environment, while also managing Dhcp,dns and Yum package mirroring.
First, install and modify cobbler configuration
1. Cobbler is not in CentOS's basic source, you need to import Epel source upgrade package,
# RPM-UVH HTTP://DOWNLOAD.FEDORAPROJECT.ORG/PUB/EPEL/6/X86_64/EPEL-RELEASE-6-8.NOARCH.RP
After the installation run Yum error:
Error:cannot retrieve Metalink for Repository:epel. Please verify its path and try again
Solving method
Vim/etc/yum.repos.d/epel.repo
Edit the # BaseURL before the [Epel] and add the # number before mirrorlist. The correct configuration is as follows:
[Epel]
Name=extra Packages for Enterprise Linux 6-$basearch
baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $basearch
Failovermethod=priority
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6
Run again
2. Yum Installation Cobbler Package
# yum-y Install cobbler httpd rsync tftp-server xinetd DHCP
3. Open the Cobbler service, restart the Apache service, set up each service to boot from
# service httpd Start
# service Cobblerd Start
# service XINETD Start
#/sbin/chkconfig httpd on
#/sbin/chkconfig DHCPD on
#/sbin/chkconfig xinetd on
#/sbin/chkconfig TFTP on
#/sbin/chkconfig Cobblerd on
4. Close SELinux and firewalls
# Vi/etc/sysconfig/selinux
Selinux=enforcing Change to Selinux=disabled
Reboot system
5. Modify Cobbler Configuration
# vi/etc/cobbler/setting
' next_server:127.0.0.1 ' replaces native IP address (DHCP service address)
' server:127.0.0.1 ' replaces native IP address (Cobbler service address)
' manage_dhcp:0 ' replaced with 1 (Cobbler admin DHCP, later for synchronous update configuration information [Cobbler Sync])
' manage_rsync:0 ' replaced by 1 (Cobbler admin rsync feature)
6. Load part of missing network boot-loaders
# Cobbler Get-loaders
7. Start TFTP and rsync services
# vi/etc/xinetd.d/tftp
Modified into: Disable=no
# Vi/etc/xinetd.d/rsync
Modified into: Disable=no
8. Modify the DHCP template to ensure that DHCP-assigned addresses and cobbler are on the same network segment
# cat/etc/cobbler/dhcp.template
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.1.0 netmask 255.255.255.0 {
Option routers 192.168.1.1;
Option Domain-name-servers 192.168.1.1;
Option Subnet-mask 255.255.255.0;
Range DYNAMIC-BOOTP 192.168.1.100 192.168.1.254;
Default-lease-time 21600;
Max-lease-time 43200;
FileName "/pxelinux.0";
Next-server $next _server;
9. Modify the default password for cobbler
Use OpenSSL to generate a string of passwords and add them to the Cobbler configuration file (/etc/cobbler/settings), replacing the default_password_crypted field:
# OpenSSL passwd-1-salt ' random-phrase-here ' 1234567 '
$1$random-p$/pl7qz2d5uvh9gzhj2lyt1
# vi/etc/cobbler/settings
default_password_crypted: "$1$random-p$/pl7qz2d5uvh9gzhj2lyt1"
Note: The password saved here will be used in the bulk deployment machine, the root account login password.
10. Install Cman Start power management function
# yum Install Cman
11. Check Cobbler Installation Environment
# Cobbler Check
# Cobbler Sync
II. Import of ISO documents
1. Mount ISO image to/meida directory
#mount/dev/cdrom/media/
2 Import the client's OS from ISO. This automatically sets "x86_64" and names it as Centos6.2
#cobbler Import--path=/media--name=centos6.2--arch=x86_64
It takes a little time, don't worry. To view/var/www/cobbler/ks_mirror/centos6.2-x86_64/directory file generation
# Cobbler Sync
# Cobbler List
Distros:
Centos6.2-x86_64
Profiles
Centos6.2-x86_64
Systems
Repos
Images
Mgmtclasses:
Packages
Files
Third, deployment testing
Create a virtual machine to test, set the virtual machine to network PXE boot if shown
Error and exit, the following into the start interface as shown in the picture, select the Red section, to install
Screenshots during installation
As shown in the following figure, the system is installed and 388 packages are installed for reboot.
At this point, the simplest unmanned installation operating system has been completed,
Subsequent updates, customizing the installation system server according to the kickstart file