Cobbler Common knowledge

Source: Internet
Author: User

First, import the system image to cobbler

Cobbler import--path=/var/www/html/os/centos-5.10-x86_64--name=centos-5.10-x86_64--arch=x86_64 #导入系统镜像文件, need some time

Cd/var/www/cobbler/ks_mirror #进入系统镜像导入目录

Command format: Cobbler import--path= Mirror path--name= Install boot name--arch=32 bit or 64 bit

Repeat the above and import the other system image files into the Cobbler


Second, set profile

Associated system image files and kickstart automatic installation files according to the operating system version

When the system image is imported for the first time, cobbler specifies a default kickstart automatic installation file for the installation image

For example: The centos-5.10-x86_64 version of the Kickstart automatic installation file is:/VAR/LIB/COBBLER/KICKSTARTS/SAMPLE.KS

Cobbler Profile Report--name centos-5.10-x86_64 #查看profile设置

Cobbler distro Report--namecentos-5.10-x86_64 #查看安装镜像文件信息

Cobbler Profile remove--name=centos-5.10-x86_64 #移除profile

Cobbler Profile add--name=centos-5.10-x86_64--distro=centos-5.10-x86_64--kickstart=/var/lib/cobbler/kickstarts/ CENTOS-5.10-X86_64.KS #添加

Cobbler Profile edit--name=centos-5.10-x86_64--distro=centos-5.10-x86_64--kickstart=/var/lib/cobbler/kickstarts/ CENTOS-5.10-X86_64.KS #编辑

Command: Cobbler profile add|edit|remove--name= installation boot name--distro= system image name--kickstart=kickstart automatic installation file path

--name: Custom Installation Boot name, note cannot be duplicated

--distro: The system installs the image name, uses the Cobblerdistro list to be able to view

--kickstart: Kickstart automatic installation file associated with the system image file

#查看Cobbler列表

Cobbler List

Cobbler Report

Cobbler Profile Report

Cobbler distro List

#通过profile查找对应的kickstart自动安装文件文件

For example:

ksfile=$ (Cobbler Profile report--name centos-5.10-x86_64|grep-e ' ^kickstart ' |head-n 1|cut-d ': '-f 2); cat$ksfile;

Repeat the above actions to associate the other system image files with the Kickstart automatic installation files.

Attention:

1. Kickstart automatic installation files need to be pre-configured

2, each time you modify the configuration file, you need to perform a synchronization operation: Cobbler sync configuration to take effect

3, Kickstart automatic installation files can be generated with tools (need to use the graphical interface operation)

Yum Install System-config-kickstart #安装

Yum Groupinstall "X windowsystem" #安装X window graphical interface

System-config-kickstart #运行kickstart配置

Service Cobbler Sync #与cobbler sync functions the same

Service Cobbler Restart #重启cobbler



Third, reinstall the system:

Install Koan on a server that requires a system reload

wget http://dl.fedoraproject.org/pub/epel/5/x86_64/koan-2.4.4-1.el5.noarch.rpm #CentOS5. X

RPM-IVH koan-2.4.0-1.el5.noarch.rpm #安装koan

http://dl.fedoraproject.org/pub/epel/6/x86_64/koan-2.4.0-1.el6.noarch.rpm #CentOS6. X

Yum Install cobbler Debmirror pykickstart python-ctypes Cman #安装koan运行依赖包 (need to set Epel source)

Koan--list=profiles--server=192.168.21.128 #查看Cobbler服务器系统镜像列表

Koan--replace-self--server=192.168.21.128--profile=centos-5.10-x86_64 #选择要重装的系统

Reboot #重新启动系统进行自动安装


Iv. Expansion of reading:

Cobbler Directory Description:

1. Cobbler configuration file directory:/etc/cobbler

/etc/cobbler/settings #cobbler主配置文件

/etc/cobbler/dhcp.template #DHCP服务的配置模板

/etc/cobbler/tftpd.template #tftp服务的配置模板

/etc/cobbler/rsync.template #rsync服务的配置模板

/etc/cobbler/iso #iso模板配置文件

/etc/cobbler/pxe #pxe模板文件

/etc/cobbler/power #电源的配置文件

/etc/cobbler/users.conf #Web服务授权配置文件

/etc/cobbler/users.digest #用于web访问的用户名密码配置文件

/etc/cobbler/dnsmasq.template #DNS服务的配置模板

/etc/cobbler/modules.conf #Cobbler模块配置文件

2. Cobbler Data Catalog:/var/lib/cobbler

/var/lib/cobbler/config #配置文件

/var/lib/cobbler/triggers #Cobbler命令

/var/lib/cobbler/kickstarts #默认存放kickstart文件

/var/lib/cobbler/loaders #存放的各种引导程序

3. System installation image directory:/var/www/cobbler

/var/www/cobbler/ks_mirror #导入的系统镜像列表

/var/www/cobbler/images #导入的系统镜像启动文件

/var/www/cobbler/repo_mirror #yum源存储目录

4. Log directory:/var/log/cobbler

/var/log/cobbler/install.log #客户端系统安装日志

/var/log/cobbler/cobbler.log #cobbler日志


V. Common commands

1, install only once the setting method

# sed-i ' s/pxe_just_once:0/pxe_just_once:1/g ' /etc/cobbler/settings

2. Specify Network Settings installation

Specify Device Network information:

# Cobbler system Edit--name=xx \

--hostname xx \

--interface=eth0\

--mac=00:00:00:00:00:01\

--ip-address=xx\

--netmask=xx\

--gaway xx \

--dns-name=xx\

--static=1

Direct Configuration Bonding:

# Cobbler system Edit--name=xx \

--interface=eth0\

--ip= "" \

--netmask= "" \

--gaway "" \

--dns-name= "" \

--interface-type=bond_slave \

--INTERFACE-MASTER=BOND0 \

--INTERFACE=ETH1 \

--static=1\

--MAC=00:00:00:00:00:01 \

--interface-type=bond_slave \

--INTERFACE-MASTER=BOND0 \

--INTERFACE=BOND0 \

--interface-type=

--static=1


This article is from the "zhanguo1110" blog, make sure to keep this source http://zhanguo1110.blog.51cto.com/5750817/1599571

Cobbler Common knowledge

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.