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 the three core components of cobbler. In general, the three components can be deployed automatically after being configured.

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. During installation, it is customized based on the configuration file. When this item is configured, it must be associated with distro.

System

It is mainly used to define kernel parameters, power management, computer names, network interface parameters, and so on (clients). For example, you can configure IP addresses based on mac addresses and perform automatic installation by associating with profile and distro.

Repo

It is mainly used to configure yum image information.

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

For example:

# Cobbler distro -- help

Usage

=====

Cobbler distro add

Cobbler distro copy

Cobbler distro edit

Cobbler distro find

Cobbler distro list

Cobbler distro remove

Cobbler distro rename

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:

# Cobbler distro add -- name = Centos6.6-x86_64 -- kernel =/mnt/isolinux -- initrd =/mnt/isolinux -- arch = x86_64 -- breed = redhat

# Cobbler distro list

Centos6.6-x86_64

Centos7-dvd-x86_64

# Cobbler distro rename-name = Centos6.6-x86_64-newname = Centos6.9-x86_64

# Cobbler distro list

Centos6.9-x86_64

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:

# Cobbler profile add -- name = Centos6.9-x86_64 -- distro = Centos6.9-x86_64 -- kickstart =/var/lib/cobbler/kickstarts/centos6.9-x86_64.cfg

# Cobbler profile list

Centos6.9-x86_64

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:

# 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

# Cobbler list

Distros:

Centos6.9-x86_64

Centos7-dvd-x86_64

Profiles:

Centos6.9-x86_64

Centos7-dvd-x86_64

Systems:

Centos6.9-x86_64

Repos:

Images:

Mgmtclasses:

Packages:

Files:

# 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:

# Cobbler repo add -- mirror = https://mirrors.aliyun.com/centos/7.3.1611/ OS /x86_64/ -- name = centos7.3-x86_64

# Cobbler repo list

Centos7.3-x86_64

# Cobbler reposync # synchronize repo. The installation tree of centos7.3.1611 will be downloaded from the Internet to this location/var/www/cobbler/repo_mirror

 

Check the final Configuration:

# Cobbler list

Distros:

Centos6.9-x86_64

Centos7-dvd-x86_64

Profiles:

Centos6.9-x86_64

Centos7-dvd-x86_64

Systems:

Centos6.9-x86_64

Repos:

Centos7.3-x86_64

Images:

Mgmtclasses:

Packages:

Files:

To be continued ............

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.