1. VMware 12 虚拟机
  2. Centos 7 操作系统(网卡模式:NAT模式;IP地址为:
  3. 软件包: epel-release-latest-7.noarch.rpm 密 码:fqw7


  1. 安装 epel-release-latest-7.noarch.rpm 软件包(cobbler相关软件包是由EPEL源提供的)

    rpm -ivh /mnt/epel-release-latest-7.noarch.rpm
  2. 安装cobbler cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd软件包
yum install cobbler cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd -y
  1. 修改cobbler主配置文件:
    vim /etc/cobbler/settings

next-server: #tftp服务器的ip地址
server: #服务器的ip地址
manage_dhcp:1 #开启dhcp功能

  1. 使用cobbler check对cobbler做检查设置
    cobbler check 

The following are potential configuration items that you may want to fix:

1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:

2 : change 'disable' to 'no' in /etc/xinetd.d/tftp

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 haveinstalled a recent version of the syslinux package installed and can ignore this message entirely. Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.

4 : enable and start rsyncd.service with systemctl

5 : debmirror package is not installed, it will be required to manage debian deployments and repositories

6 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1-salt 'random-phrase-here' 'your-password-here'" to generate new one

7 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

  1. 修改cobbler用户的初始密码,可以使用以下命令生成密码
    openssl passwd -1 -salt 'abc123' 'abc123'    #盐值加密

$1$abc123$9v8z2./E/PZihXrVcy3II0 #加密后的密码


default_password_crypted: "$1$abner$kDle2KnwbPHdm1UZEE79V." #替换密码,此为root用户密码
:wq! #保存退出

  1. 下载引导操作系统文件

    cobbler get-loaders 
  2. 启动rsyncd服务

    systemctl start rsyncd.service
  3. 开启tftp服务
    vim /etc/xinetd.d/tftp

    disable = no #将yes修改为no,启用tftp


systemctl restart xinetd.service

  1. 编辑dhcp模板文件
    vim /etc/cobbler/dhcp.template       


subnet netmask {
option routers; #修改网关
option domain-name-servers; #修改DNS
option subnet-mask;
range dynamic-bootp; #修改地址池
:wq! #保存退出

  1. 同步生成DHCP配置文件
    cobbler sync      
  2. 启动dhcpd服务

    systemctl restart dhcpd.service    
  3. 加载系统光盘镜像
    mount /dev/sr0 /mnt


    cobbler import --path=/mnt/ --name=CentOS-7-x86_64 --arch=x86_64 





cobbler list    



cobbler distro list   



yum install tree -y

tree /var/lib/tftpboot/images #查看内核和初始化文件在tftp server 共享目录
└── Centos-7-x86_64
├── initrd.img
└── vmlinuz

cobbler profile report

Name : Centos-7-x86_64
TFTP Boot Files : {}
Comment :
DHCP Tag : default
Distribution : Centos-7-x86_64
Enable gPXE? : 0
Enable PXE Menu? : 1
Fetchable Files : {}
Kernel Options : {}
Kernel Options (Post Install) : {}
Kickstart : /var/lib/cobbler/kickstarts/sample_end.ks
Kickstart Metadata : {}
Management Classes : []
Management Parameters : <<inherit>>
Name Servers : []
Name Servers Search Path : []
Owners : ['admin']
Parent Profile :
Internal proxy :
Red Hat Management Key : <<inherit>>
Red Hat Management Server : <<inherit>>
Repos : []
Server Override : <<inherit>>
Template Files : {}
Virt Auto Boot : 1
Virt Bridge : xenbr0
Virt CPUs : 1
Virt Disk Driver Type : raw
Virt File Size(GB) : 5
Virt Path :
Virt RAM (MB) : 512
Virt Type : kvm






setenforce 0
systemctl stop firewalld.service

登录账户名:root 密码:abc123

Cobbler Web用户设置

vim /etc/cobbler/modules.conf     

authn_configfile #默认就是模块认证

htdigest -c /etc/cobbler/users.digest Cobbler maaiqiang


systemctl restart cobblerd.service
systemctl restart httpd.service



以下为Cobbler web管理平台