CentOS 7安装Cobbler2.6.9自动化部署工具

Cobbler自动化部署工具

Cobbler简介

RHEL7默认提供的Cobbler是2.6.9版本的,Cobbler译文”补鞋匠“网络安装套件Cobbler可以同时管理DHCP;DNS;YUM等,现在随便一家互联网公司机器数量成千上万,这个时候我们就不能那个U盘,或者光盘一台台的装,然后诞生了PXE+TFTP+DHCP+Kickstart(俗称PXE)然而PXE不能同时部署多种版本的系统,然而Cobbler可以部署多种系统如CentOS5,6,7;RedHat 5,6,7;Cobbler还可以部署Windows系统。该工具由Python语言开发,支持Web界面管理十分灵活。

PXE自动化部署参考:

配置yum源

Cobbler CentOS源没有Cobbler包组,它是由epel提供,但是其依赖的软件包又是CentOS所提供,所以我们配置CentOS,epel 两个yum源

[root@cobbler yum.repos.d]# cat aliyun.repo 
[epel]
name=ailiyun
baseurl=http://mirrors.aliyun.com/epel/7/x86_64/
enabled=1
gpgcheck=0
[centos]
name=cobbler
baseurl=http://mirrors.aliyun.com/centos/7/os/x86_64/
enabled=1
gpgcheck=0

开始安装

[root@cobbler yum.repos.d]# yum install cobbler cobbler-web pykickstart debmirror 
[root@cobbler ~]# rpm -qi cobbler
Name        : cobbler
Version    : 2.6.9
Release    : 1.el7
Architecture: noarch
Install Date: Thu 20 Aug 2015 09:00:46 PM CST
Group      : Applications/System
Size        : 2177634
License    : GPLv2+
Signature  : RSA/SHA256, Wed 24 Jun 2015 04:36:07 AM CST, Key ID 6a2faea2352c64e5
Source RPM  : cobbler-2.6.9-1.el7.src.rpm
Build Date  : Tue 23 Jun 2015 02:06:19 AM CST
Build Host  : buildppc-02.phx2.Fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL        :
Summary    : Boot server configurator
Description :
Cobbler is a network install server.  Cobbler supports PXE, ISO
virtualized installs, and re-installing existing Linux machines.
The last two modes use a helper tool, 'koan', that integrates with
cobbler.  There is also a web interface 'cobbler-web'.  Cobbler's
advanced features include importing distributions from DVDs and rsync
mirrors, kickstart templating, integrated yum mirroring, and built-in
DHCP/DNS Management.  Cobbler has a XMLRPC API for integration with
other applications.

启动cobbler,httpd服务

[root@cobbler ~]# systemctl start httpd.service
[root@cobbler ~]# systemctl start cobblerd.service

关闭selinux

[root@cobbler ~]# cat /etc/selinux/config 
 
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#    enforcing - SELinux security policy is enforced.
#    permissive - SELinux prints warnings instead of enforcing.
#    disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#    targeted - Targeted processes are protected,
#    minimum - Modification of targeted policy. Only selected processes are protected. 
#    mls - Multi Level Security protection.
SELINUXTYPE=targeted 
[root@cobbler ~]# getenforce 
Permissive  或者  Disabled
[root@cobbler ~]# cobbler check
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 localhost, or kickstarting features will not work.  This should 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 should match the IP of the boot server on the PXE network.
3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
    https://github.com/cobbler/cobbler/wiki/Selinux
4 : change 'disable' to 'no' in /etc/xinetd.d/tftp
5 : 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, 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.
6 : file /etc/xinetd.d/rsync does not exist
7 : debmirror package is not installed, it will be required to manage debian deployments and repositories
8 : 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
9 : 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.

解决以上报告信息
修改参数

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/13318.html