Cobbler Enables automatic installation of the Operating System

Source: Internet
Author: User
I. Introduction to cobbler

Cobbler is a tool for automated installation of the operating system. It solves the disadvantages of PXE installation (only a single operating system can be installed ). In fact, cobbler is an advanced abstraction tool installed on a multi-version and multi-environment operating system for PXE secondary encapsulation.

The working principle is roughly as follows:

650) This. width = 650; "Title =" 3 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 3 "src =" http://img1.51cto.com/attachment/201410/7/8886857_14126784054F7e.png "width =" 931 "Height =" 502 "/>

In fact, cobbler is a secondary encapsulation of PXE. Cobbler can automatically implement some manual processes in PXE configuration. PXE works as follows:

650) This. width = 650; "Title =" 2 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 2 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678437VLle.png "width =" 813 "Height =" 403 "/>

For specific PXE configuration, refer to the http://guoting.blog.51cto.com/8886857/1533029


Ii. Cobbler installation and configuration

Note:

Target Host: 172.16.10.9

Operating System: centos 6.5

Install and configure cobbler
## 1. Install cobbler # Description: Cobbler RPM installation package, yum install cobbler-Y2 is provided by epel source, httpdyum install httpd-yservice httpd start3 is started, cobblerd service cobblerd start4 is started, cobbler is configured # The cobbler chenck command is used, check whether the cobbler configuration file is correctly configured # The following prompt appears for the first time: The following are potential configuration items that you may want to fix: 1: the 'server' field in/etc/cobbler/settings must be set to something other than loca Lhost, or kickstarting features will not work. this shoshould be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.2: For PXE to be functional, the 'next _ Server' field in/etc/cobbler/settings must be set to something other than 127.0.0.1, and shocould match the IP of the boot server on the pxnetworke .3: some network boot-loaders are missing from/var/lib/ Cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a * recent * version of The syslinux package installed and can ignore this message entirely. files in this directory, shocould you want to support all ubuntures, shocould include pxelinux.0, menu. c32, elilo. EFI, and yaboot. the 'cobbler get -Loaders 'COMMAND is the easiest way to resolve these requirements.4: Change 'disable' to 'no' in/etc/xinetd. d/rsync5: debmirror package is not installed, it will be required to manage Debian deployments and repositories6: ksvalidator was not found, install pykickstart7: the default password used by the sample templates for newly installed machines (default_password_crypted in/etc/cobbler/SE Ttings) is still set to 'jobbler' and shoshould be changed, try: "OpenSSL passwd-1-salt 'random-phrase-Here ''ur-password-Here '" to generate new one8: Fencing tools were not found, and are required to use the (optional) power management features. install CMAN or fence-agents to use themrestart cobblerd and then run 'cobbler sync' to apply changes. # solution: 1. Modify the server parameter value in the/etc/cobbler/settings file The IP address or Host Name of the host that provides the cobbler service, such as 172.16.10.9; 2. Modify the value of next_server in the/etc/cobbler/settings file to the IP address of the host that provides the PXE service, for example, 172.16.10.9; 3. If the current node can access the Internet, run the "cobbler get-loaders" command. Otherwise, install the syslinux package, then copy/usr/share/syslinux/{pxelinux.0, MEMU. c32} and other files to the/var/lib/cobbler/loaders/directory; 4. Execute the "chkconfig rsync on" command; 5. Comment/etc/debmirror. "@ dists =" Sid ";" in the conf file; 6. Comment/etc/debmirror. "@ arches =" i386 ";" in the conf file. 7. Run "OpenSSL passwd-1- Salt $ (OpenSSL rand-hex 4) "to generate a password and replace it with the value of the default_password_crypted parameter in the/etc/cobbler/settings file; 8. Run the "yum install CMAN fence-agents" command to install the corresponding package. ## Steps 5, 6, and 8 are not required. Then restart cobblerd and execute "cobbler sync" to synchronize the new configuration to cobbler.
The result is as follows:

650) This. width = 650; "Title =" 4 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 4 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678440CsW8.png "width =" 753 "Height =" 124 "/>

The DHCP and TFTP services need to be configured below. Note: Cobbler depends on DHCP, TFTP, rsync, and DNS services. DHCP can be provided by DHCPD (ISC) or dnsmasq, TFTP can be provided by the TFTP-server package, or TFTP provided by cobbler; rsync is provided by rsync packages; DNS can be provided by BIND, or dnsmasq.

Cobbler can manage some or even all of these services on its own, however, you must configure "manage_dhcp", "manage_tftpd", "manage_rsync", and "manage_dns" in the/etc/cobbler/settings file. In addition, since each service has a different implementation method, if you need to customize it, you need to modify/etc/cobbler/modules. the value of the module parameters of each service in the conf configuration file.

The following uses an independent management method, that is, not using cobbler to manage these services. (Common)

Configure Dhcp Service
Yum install DHCP-y # edit/etc/DHCP/DHCPD. conf configuration file with the following content: Option domain-name "example.com"; Option domain-name-servers 172.16.0.1; default-lease-time 600; max-lease-time 7200; log-facility local7; subnet 172.16.0.0 netmask 255.255.0.0 {range 172.16.10.14 172.16.10.99; Option routers 172.16.0.1; next-server 172.16.10.9; FILENAME "pxelinux.0 ";} #################################### service DHCPD start
Configure rsync and TFTP services
Yum install rsync TFTP-server-ychkconfig rsync on # Of course, this step has been completed in the previous cobbler check, non-essential chkconfig rsync onservice xinted start
Configure cobbler
the cobbler command must be used to configure cobbler. A brief description of the cobbler command is as follows: (commonly used) The sub-command of the cobbler command: Import: import the install tree from the CD. The repository is automatically defined. Reposync: Install tree synchronized from the Internet. Buildiso: The machine used for installation does not support Nic boot. In this case, you need to create an ISO image to complete the installation. Distro: defines distribution Sync: completes synchronization of configuration files profile: defines profile check: check the cobbler configuration file. Each sub-command contains sub-commands such as [add | edit | copy | getks * | list | remove | rename | report. Help information for specific use. Example: Cobbler import add -- help to view help. ######################################## ######################################## ################## The first step to make cobbler available is to define distro, you can install the boot kernel and ramdisk file externally. If you already have a complete system installation tree (such as the centos6 installation image), we recommend that you use import directly. Cobbler uses the profile to provide the required installation configuration for a specific requirement category. That is, based on distro, the Kickstart file is provided to generate a specific system installation configuration. Distro's profile can appear in the PXE boot menu as one of the installation options. ######################################## ######################################## ################### Of course, the Kickstart file is completed in advance. For more information, see http://guoting.blog.51cto.com/8886857/1533029cobbler import -- name = centos-6.5-x86_64 -- Path =/Media/CDROM cobbler profile add -- name = centos6.5 -- distro = centos-6.5-x86_64 -- kickstart =/root/centos-6.5-x86_64.cfg cobbler sync # detailed installation for the process, refer to the official website: http://www.cobblerd.org/manuals/quickstart/
Result example:

650) This. width = 650; "Title =" 6 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 6 "src =" http://img1.51cto.com/attachment/201410/7/8886857_14126784453J1r.png "width =" 743 "Height =" 451 "/>

650) This. width = 650; "Title =" 7 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 7 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678552j8AC.png "width =" 746 "Height =" 584 "/>

In this case, the configuration is complete and the installation can be automated.

In this case, automation can be achieved.

650) This. width = 650; "Title =" 8 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 8 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678557Bc9r.png "width =" 699 "Height =" 366 "/>

650) This. width = 650; "Title =" 9 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 9 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678563SfWI.png "width =" 700 "Height =" 415 "/>

Note: The URL location in the Kickstart file, -- url = http: // 172.16.10.9/cobbler/ks_mirror/centos-6.5-x86_64/specifies the location of the repository, different systems for different paths. To install multiple systems, check and import different operating systems. The operating system of the system version can also be defined using different kickstart files. Web configuration of cobbler

The preceding operations can also be set through the web interface. The specific steps are as follows:

###### Configure the cobbler_web authentication function ### install the software Yum install cobbler_web # cobbler_web supports multiple authentication methods, such as authn_configfile, authn_ldap, and authn_pam. The default value is authn_denyall, deny all user logon. ### Use the authn_pam module to authenticate a cobbler_web user ## first modify the module parameter value of the [authentication] section in/etc/cobbler/modules to authn_pam. # Add a system user. Set the user name and password as needed, as shown in the following command. Useradd cobblerecho 'cblrpass' | passwd -- stdin cobbler # Then add the cblradmin user to the cobbler_web Admin group. Modify the/etc/cobbler/users. conf file and add the cblradmin user name as the value of the Admin parameter, as shown below. [Admins] admin = "cobbler" # restart the cobblerd service and access it through http: // your_cobblerd_ip/cobbler_web.

The configuration page is as follows:


650) This. width = 650; "Title =" 10 "style =" border-right-width: 0px; border-bottom-width: 0px; border-top-width: 0px; "Border =" 0 "alt =" 10 "src =" http://img1.51cto.com/attachment/201410/7/8886857_1412678582SL9X.png "width =" 861 "Height =" 578 "/>

The specific configuration process is not demonstrated here.

This article from the "cold" blog, please be sure to keep this source http://guoting.blog.51cto.com/8886857/1561035

Cobbler Enables automatic installation of the Operating System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.