Operation and maintenance Automation deployment Cobbler installation Process

Source: Internet
Author: User
Tags bind centos iptables firewall

I. Overview

The service is best installed under CentOS, and it requires Python support.

The Cobbler service is a container that integrates the following several open source software:

1 Dhcp

2 Dns (optional BIND,DNSMASQ)

3 Kickstart/pxe

4 Apache (provides kickstart installation source, and provides customized kickstart configuration)

5 Tftp (required for PXE booting)

At the same time, it has a deep integration with Apache. Cobbler enables rapid deployment of the Redhat/centos/fedora system, as well as support for SuSE and Debian (Ubuntu) systems.

To sum up, an ideal installation environment is:

Related configuration parameters:

Official documents: https://github.com/cobbler/cobbler/wiki/

Second, the installation

1) define Yum source

You can choose a mirror source close to yourself based on your location, such as mirrors.163.com or mirrors.sohu.com

Related configuration file:/etc/yum.repos.d/centos-base.repo

2) Install Epel source

CENTOS5 32-bit: RPM-UVH http://mirrors.ustc.edu.cn/fedora/epel/5/i386/epel-release-5-4.noarch.rpm

CENTOS5 64-bit: RPM-UVH http://mirrors.ustc.edu.cn/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm

CENTOS6 32-digit: RPM-UVH ' http://mirrors.ustc.edu.cn/fedora/epel/6/i386/epel-release-6-7.noarch.rpm '

CENTOS6 64-digit: RPM-UVH ' http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm '

Determine if the installation is correct:

Yum list|grep-e "^epel"

Epel-release.noarch 5-4 Installed

You can also use this command: Rpm-qa |grep-i Epel

3) Installation of Cobbler service

A) yum-y Install Cobbler

Confirm that the installation is correct:

Rpm-qa |grep-i Cobbler

(B) installation of other required services

Yum-y Install Cman tftp-server dhcp cobbler cobbler-web bind Pykickstart rsync

Depending on your needs, such as my test environment does not need bind, there is no installation

You need to confirm that the MOD_WSGI is installed properly or you will need to install it manually

Yum-y Install Mod_wsgi

Confirm that the Apache configuration is loaded Wsgi_module:/etc/httpd/conf.d/wsgi.conf

4) Installation Debmirror

Debmirror can be used to download the image source for Ubuntu 12.04 as a local source.

At present, debmirrors can only be installed using RPM package, first load dependent package

Yum-y install ed patch perl perl-compress-zlib perl-cwd perl-digest-md5 perl-digest-sha1 perl-lockfile-simple PERL-LIBWW W-perl

Install Debmirrors:

RPM-UVH ' http://mirrors.ustc.edu.cn/fedora/epel/5Server/x86_64/debmirror-20090807-1.el5.noarch.rpm '

5) Close SELinux and firewalls

Sed-i '/^selinux=/s/^selinux=.*/selinux=disabled/g '/etc/selinux/config

Setenforce 0

For debugging convenience, temporarily shut down the firewall

Service Iptables Stop

6) Start Cobbler Service

/etc/init.d/cobblerd start

7 Possible missing packages:

Please note that the Cobbler service startup error message, I encountered the first installation of the cTYPES error, can only be manually installed:

Yum-y Install Python-ctypes

8) Cobbler Related configuration

Modify the Cobbler Master profile as needed:/etc/cobbler/settings

Cobbler Listening IP is 192.168.100.1

Sed-i ' s/server:127.0.0.1/server:192.168.100.1/g '/etc/cobbler/settings

PXE installation is only allowed once, preventing misoperation (useful in the formal environment). The actual test to see that this function can be blocked off)

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

The IP address of the DHCP service, which is used during the PXE process

Sed-i ' s/next_server:127.0.0.1/next_server:192.168. 100.1/g '/etc/cobbler/settings

Support for DHCP management, and when making a custom configuration, you need to modify the DHCP-related configuration to match the PXE boot

Sed-i ' s/manage_dhcp:0/manage_dhcp:1/g '/etc/cobbler/settings

9) for Cobbler system inspection

Cobbler Check

Automatically check to see if the installation environment meets the needs of the Cobbler service

The following results appear:

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

1:some network boot-loaders are missing from/var/lib/cobbler/loaders, you could run ' cobbler get-loaders ' to download the M, or, if you are want to handle x86/x86_64 netbooting, your may ensure this you have installed a *recent* version of the Syslinux package installed and can ignore this message entirely. Files in this directory, should your 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.

Solution: Execute Cobbler get-loaders

2:since Iptables may running, ensure, 80/443, and 25151 are

WORKAROUND: Iptables guarantee 69 80 443 25151 port data is not limited, if only used in the internal environment, it is recommended to directly turn off the firewall

3:debmirror package is not installed, it'll be required to manage Debian deployments and repositories

Solution: Debian installation, temporarily can not ignore; If you need to install, download the address: Http://rpmfind.net/linux/rpm2html/search.php?query=debmirror

4:the default password used by the sample templates for newly installed machines (default_password_crypted IN/ETC/COBBL Er/settings) is still the set to ' cobbler ' and should be changed, try: "OpenSSL passwd-1 '-salt random-phrase-here '" Your-pas Sword-here ' "To generate new one

WORKAROUND: Default encrypted password, you can modify

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

Workaround: About power management (similar to Dell Remote Control Protocol), also temporarily.

10 reboot the Cobbler and update the related configuration

Restart Service

/etc/init.d/cobblerd restart

Sync with the latest cobbler configuration, which automatically modifies services such as dhcp,bind based on configuration, so what I call the container is the reason.

Cobbler Sync

Note: In the whole process of the study of Cobbler, the predecessor Chen Shak Teacher (www.chenshake.com) of the strong support and dispel doubts, in the preparation of this article, also borrowed some of the article Sark teacher, hereby thank you.

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.