Centos7 uses cobbler (2.8) to deploy the operating system in batches.

Source: Internet
Author: User

Centos7 uses cobbler (2.8) to deploy the operating system in batches.
1. Common Cobbler commands 1.1 view cobbler help

# Cobbler -- help

Usage

=====

Cobbler <distro | profile | system | repo | image | mgmtclass | package | file>...

[Add | edit | copy | getks * | list | remove | rename | report] [options | -- help]

Cobbler <aclsetup | buildiso | import | list | replicate | report | reposync | sync | validateks | version | signature | get-loaders | hardlink> [options | -- help]

Distro, profile, and system are three core components of cobbler.

Distro

It is mainly used to define and set the system release version, including the system kernel, boot file, and installation package, which is equivalent to an ISO image of a LINUX system. For example, multiple Release versions have different versions.

Profile

It is mainly used to define the kickstart configuration file, which is customized according to the configuration file during installation.

System

It is mainly used to define kernel parameters, power management, computer names, network interface parameters, and so on (clients), such as configuring IP addresses based on mac addresses, or specifying other network information through the configuration file.

Repo

It is mainly used to configure the yum image source.

 

The help information of Cobbler is in this format: cobbler sub-command-help

For example:

 1 # cobbler distro --help 2  3 usage 4  5 ===== 6  7 cobbler distro add 8  9 cobbler distro copy10 11 cobbler distro edit12 13 cobbler distro find14 15 cobbler distro list16 17 cobbler distro remove18 19 cobbler distro rename20 21 cobbler distro report

 

 

1.2 Cobbler distro command

This command is mainly used to add, edit, copy, search, remove, and rename distro.

The format is (take add as an example ):

Cobbler distro add -- name = string -- kernel = path -- initrd = path

[-- Kopts = string] [-- kopts-post = string] [-- ksmeta = string]

[-- Arch = x86 | x86_64 | ia64] [-- breed = redhat | debian | suse]

[-- Template-files = string]

Where:

 

Name

Used to specify the system version. For example, RHEL7

Kernel

Specifies the absolute path of a kernel image file.

Initrd

Specifies the absolute path of a RAM image file.

Kopts

Specifies the kernel command line parameters.

Kopts-post

Same as above

Arch

Used to specify the operating system version platform, such as X86_64

Ksmeta

Is an advanced feature used to replace kickstart Variables

Breed

Used to specify the operating system manufacturers, such as redhat Ubuntu and centos.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example:

 1 # cobbler distro add --name=Centos6.6-x86_64 --kernel=/mnt/isolinux --initrd=/mnt/isolinux --arch=x86_64 --breed=redhat 2  3 # cobbler distro list 4  5    Centos6.6-x86_64 6  7    Centos7-dvd-x86_64 8  9 # cobbler distro rename –name=Centos6.6-x86_64 –newname=Centos6.9-x86_6410 11 #cobbler distro list12 13    Centos6.9-x86_6414 15    Centos7-dvd-x86_64
1.3 Cobbler profile command

This command is used to add, edit, copy, search, remove, rename a profile.

The format is (take add as an example ):

Cobbler profile add -- name = string -- distro = string [-- kickstart = path]

[-- Kopts = string] [-- ksmeta = string] [-- virt-file-size = gigabytes]

[-- Virt-ram = megabytes] [-- virt-type = string] [-- virt-cpus = integer]

[-- Virt-path = string] [-- virt-bridge = string] [-- server]

[-- Parent = profile]

Name

Specifies the description name of a configuration file.

Distro

Used to associate distro

 

 

Kickstart

Used to specify the kickstart file path

Virt -*

Virtualization-related settings

Server

This setting is only available when the client's subnet cannot access the cobbler server.

Parent

This is an advanced feature used to specify the configuration file at the upper level. It can inherit the parameters specified by the parent level.

 

 

 

 

 

 

 

 

 

 

 

 

 

Example:

1 # cobbler profile add --name=Centos6.9-x86_64 --distro=Centos6.9-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.9-x86_64.cfg2 3 # cobbler profile list4 5    Centos6.9-x86_646 7    Centos7-dvd-x86_64

 

1.4 Cobbler system command

This command is mainly used to define the network interface parameters of the client, such as specifying the ip mask gateway.

Cobbler system add -- name = string -- profile = string [-- mac = macaddress]

[-- Ip-address = ipaddress] [-- hostname = hostname] [-- kopts = string]

[-- Ksmeta = string] [-- kickstart = path] [-- netboot-enabled = Y/N]

[-- Server = string] [-- gateway = string] [-- dns-name = string]

[-- Static-routes = string] [-- power-address = string]

[-- Power-type = string] [-- power-user = string] [-- power-pass = string]

[-- Power-id = string]

Name

Specify a name

Profile

Specify a profile

Mac

Specify the MAC address of the client. This is a required parameter for automated installation. Otherwise, the client will stay in the boot menu after being guided by the network.

Ip-address

Configure the IP address of the client

Hostname

Configure the computer name of the client

Kickstart

Specify the path of the kickstart configuration file

Netboot-enable

Enable network startup?

Server

Address of the cobbler Server

Gateway

Gateway of the specified Client

Dns-name

DNS domain name of the specified Client

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Static-routers does not need to be concerned, and most machines do not need to set this item

[-- Power-address = string] [-- power-type = string] [-- power-user = string] [-- power-pass = string] [-- power-id = string] these parameters are related to power management.

 

Example:

 1 # cobbler system add --name=Centos6.9-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.9-x86_64.cfg --mac=00:0C:29:41:FC:6C --hostname=backup --profile=Centos6.9-x86_64 --interface ens33 2  3 # cobbler list 4  5 distros: 6  7    Centos6.9-x86_64 8  9    Centos7-dvd-x86_6410 11  12 13 profiles:14 15    Centos6.9-x86_6416 17    Centos7-dvd-x86_6418 19  systems:20 21    Centos6.9-x86_6422 23 repos:24 25 images:26 27 mgmtclasses:28 29 packages:30 31 files:32 33 # cobbler system edit --name=Centos6.9-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.9-x86_64.cfg --mac=00:0C:29:41:FC:6C --hostname=backup --profile=Centos6.9-x86_64 --interface eth0

 

1.5 Cobbler repo command

This command is mainly used to specify a repository source image, not only the source in the installation tree imported using the import method, but also rsync: // URL, SSH local source, http: // URL, FTP: // URL, or local source.

Command Format:

Cobbler repo add -- mirror = url -- name = string [-- rpmlist = list]

[-- Creatrepo-flags = string] [-- keep-updated = Y/N] [-- priority = number]

[-- Arch = string] [-- mirror-locally = Y/N] [-- breed = yum | rsync | rhn]

Mirror

Address of the image repository Source

Name

Definition name

Rpmlist

The following is a list of the names of the software packages separated by spaces, which takes effect only in http: // url, ftp: // url mode. This method can save time, space, and bandwidth. Because the packages in this list will be installed, and none of them will be installed.

Createrepo-flags

When cobbler reposync is running, a special parameter is passed to it. The default value is "-c cache"

Keep-updated

Always repo updates

Priority

Priority. The smaller the number, the higher the priority. The default value is 99. applies to all cobbler image sources.

Arch

Defines the architecture used by the repository. The current system architecture is used by default.

Mirror-locally

Define whether to use local sources or Internet Sources

Breed

Generally, the system knows what we want to do without definition. Of course, you also specify special ones.

Example:

1 # cobbler repo add -- mirror = https://mirrors.aliyun.com/centos/7.3.1611/ OS /x86_64/ -- name = centos7.3-x86_1_3 # cobbler repo list4 5 centos7.3-x86_646 7 # cobbler reposync # synchronize repo, the installation tree of centos7.3.1611 will be downloaded from the Internet to this location. the/var/www/cobbler/repo_1_8 9 command will be introduced here and I think it should be enough. For others, see man cobbler.

 

Check the final Configuration:

 1 # cobbler list 2  3 distros: 4  5    Centos6.9-x86_64 6  7    Centos7-dvd-x86_64 8  9  profiles:10 11    Centos6.9-x86_6412 13    Centos7-dvd-x86_6414 15 systems:16 17    Centos6.9-x86_6418 19 repos:20 21    centos7.3-x86_6422 23 images:24 25 mgmtclasses:26 27 packages:28 29 files:
1.6 CentOS 6 CD directory Introduction

(1) Packages Directory: contains all binary RPM Packages required for installation.
(2) EFI Directory: A 64-bit EFI-based system boot. The BOOTX64.conf in the BOOT directory is the grub configuration file, which is used to display the BOOT menu.
(3) TRANS. TBL file: record the list of the current directory and regenerate it with the-T parameter of mkisofs, mainly for the long file name.
(4) The discinfo file is the identification information of the installation media .. The treeinfo file records the directory structure of the installer in different installation methods. For example, in PXE mode, kernel = images/pxeboot/vmlinuz and root file system initrd = images/pxeboot/initrd. img.
(5) isolinux Directory: the kernel (vmlinuz) and RAM image (initrd. img) installed on the boot system are loaded into the memory during the boot system, providingLinuxInstall the boot platform. The folder also contains the boot. msg file that displays information in different modes,Splash.jpg is a background image of the boot process in special format (640*480). During InstallationThe boot menu content on the screen is specified in the isolinux/isolinux. cfg file. Press Enter to automatically Enter the graphical interface installation mode. If you press Esc, the "boot:" command prompt will be displayed to Enter the user interaction mode. There will be various operation prompts on the interface. Type "linux text" to enter the text installation mode.
(6) images Directory: contains various boot images. The most important thing is to guide the image file install. img (stage2.img in CentOS 5) to be used for second-stage installation. The anaconda program is in this image file. In addition, boot is used to create a micro boot disc. iso (which has been removed from CentOS 6 and exists in CentOS 5) can be placed in a VFAT partition of USB or other large-capacity bootable media, create a Boot Tool image diskboot. img (in CentOS 5) and pxeboot folders used to create boot media for PXE installation.

 

 

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.