Cobbler batch install the Operating System

Source: Internet
Author: User
Tags gpg metalink

Cobbler batch install the Operating System

Introduction to Cobbler

Cobbler is a fast network-based linux installation service. It also supports windows installation on the network after adjustment. This tool is developed in python and is small and lightweight (only 15 K lines of code). You can use simple commands to configure the PXE network installation environment and manage DHCP, DNS, and yum package images.

1. Install and modify cobbler configurations

1. Cobbler is not in the basic CentOS source. You need to import the EPEL source upgrade package,

Rpm-Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rp

After installing and running yum, the following error occurs:

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

Solution

Vim/etc/yum. repos. d/epel. repo

Edit the # sign before the baseurl under [epel] and add the # sign before the list. The correct configuration is as follows:

[Epel]

Name = Extra Packages for Enterprise Linux 6-$ basearch

Baseurl = http://download.fedoraproject.org/pub/epel/6/?basearch

# Items list = https://mirrors.fedoraproject.org/metalink? Epel-6 & arch = $ basearch

Failovermethod = priority

Enabled = 1

Gpgcheck = 1

Gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Run again

2. Install the cobbler package in yum

# Yum-y install cobbler httpd rsync tftp-server xinetd dhcp

3. Enable the cobbler service, restart the Apache service, and set auto-start for each service.

# Service httpd start

# Service cobblerd start

# Service xinetd start

#/Sbin/chkconfig httpd on

#/Sbin/chkconfig dhcpd on

#/Sbin/chkconfig xinetd on

#/Sbin/chkconfig tftp on

#/Sbin/chkconfig cobblerd on

4. Disable SELinux and Firewall

# Vi/etc/sysconfig/selinux

SELINUX = enforcing changed to SELINUX = disabled

Restart the system

5. Modify the cobbler Configuration

# Vi/etc/cobbler/setting

'Next _ server: 127.0.0.1 'Replace the local IP address (DHCP Service address)

'Server: 127.0.0.1 'Replace the local IP address (cobbler service address)

Replace 'Manage _ dhcp: 0' with 1 (cobbler manages dhcp, Which is used later to synchronously Update Configuration Information [cobbler sync]).

Replace 'Manage _ rsync: 0' with 1 (cobbler rsync management function)

6. Load part of the missing network boot-loaders

# Cobbler get-loaders

7. Start the tftp and rsync services

# Vi/etc/xinetd. d/tftp

Change to: disable = no

# Vi/etc/xinetd. d/rsync

Change to: disable = no

8. Modify the DHCP template to ensure that the IP address allocated by DHCP is in the same CIDR block as that of Cobbler.

# Cat/etc/cobbler/dhcp. template

Ddns-update-style interim;

Allow booting;

Allow bootp;

Ignore client-updates;

Set vendorclass = option vendor-class-identifier;

Option pxe-system-type code 93 = unsigned integer 16;

Subnet 192.168.1.0 netmask 255.255.255.0 {

Option routers 192.168.1.1;

Option domain-name-servers 192.168.1.1;

Option subnet-mask limit 255.0;

Range dynamic-bootp 192.168.1.100 192.168.1.254;

Default-lease-time 21600;

Max-lease-time 43200;

Filename "/pxelinux.0 ";

Next-server $ next_server;

9. Modify the default password of cobbler

Use openssl to generate a string of passwords and add them to the cobbler configuration file (/etc/cobbler/settings). Replace the default_password_crypted field:

# Openssl passwd-1-salt 'random-phrase-here '123'

$1 $ random-p $/pL7QZ2d5UVH9GzhJ2lYT1

# Vi/etc/cobbler/settings

Default_password_crypted: "$1 $ random-p $/pL7QZ2d5UVH9GzhJ2lYT1"

Note: The password saved here will be used for the logon password of the root account in the batch deployment machine.

10. Install the cman startup Power Management Function

# Yum install cman

11. Check the cobbler installation environment

# Cobbler check

# Cobbler sync

Ii. Import an ISO file

1. Mount the ISO image to the/meida directory

# Mount/dev/cdrom/media/

2. Import the OS of the client from iso. This will automatically set "x86_64" and name it Centos6.2

# Cobbler import -- path =/media -- name = centos6.2 -- arch = x86_64

This takes some time. Don't worry. View/var/www/cobbler/ks_mirror/centos6.2-x86_64/directory file generation

# Cobbler sync

# Cobbler list

Distros:

Centos6.2-x86_64

Profiles:

Centos6.2-x86_64

Systems:

Repos:

Images:

Mgmtclasses:

Packages:

Files:

Iii. Deployment Test

Create a virtual machine and test it. Set the virtual machine to a network PXE to start.

Report an error and exit. Next, go to the startup interface and select the red line to install it.

During Installation

As shown in, the system has been installed. A total of 388 packages have been installed and will be restarted.

 

So far, the simplest uninstallation of the operating system has been completed,

It will be updated later and customized for installing the system server according to the kickstart File

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.