Cobbler Batch Automatic network installation CentOS

Source: Internet
Author: User
Tags metalink

First, cobbler working principle

Cobbler implementation of the automated installation of the OS is dependent on:

PXE technology for NIC (DHCP client, TFTP client) + Anaconda (the program that installs the operating system on Linux)

+ DHCP (assigning IP to hosts that need to install the operating system) + TFTP (provides boot files that are required to boot based on the NIC)

+ httpd (the storage location of OS install tree) is implemented.


II. installation and modification of cobbler configuration

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

Run Yum error after installation:

Error:cannot retrieve Metalink for Repository:epel. Verify its path and try again

Workaround

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

Edit [Epel] under the BaseURL before the # number is removed, mirrorlist before adding the # number. The correct configuration is as follows:

[Epel]

Name=extra Packages for Enterprise Linux 6-$basearch

baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch

#mirrorlist =https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch= $basearch

Failovermethod=priority

Enabled=1

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-epel-6

2. Yum Install Cobbler Package

# yum-y Install cobbler httpd rsync tftp-server xinetd DHCP

3. Turn on the Cobbler service, restart the Apache service, set up each service boot

# 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. Turn off SELinux and firewalls

# Vi/etc/sysconfig/selinux

Selinux=enforcing Change to Selinux=disabled

# reboot

5. Modify the Cobbler Configuration

# vi/etc/cobbler/setting

' next_server:127.0.0.1 ' replaces the native IP address (DHCP service address)

' server:127.0.0.1 ' replaces the native IP address (Cobbler service address)

' manage_dhcp:0 ' replaced with 1 (Cobbler management DHCP, later for synchronizing update configuration information [Cobbler Sync])

' manage_rsync:0 ' replaced by 1 (Cobbler manage rsync function)

6. Loading a partially missing network boot-loaders

# Cobbler Get-loaders

7. Start the TFTP and rsync service

# vi/etc/xinetd.d/tftp

Modified to: Disable=no

# Vi/etc/xinetd.d/rsync

Modified to: Disable=no

8. Modify the DHCP template to ensure that the DHCP-assigned address and cobbler are in the same network segment

# 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 = 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 255.255.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 for cobbler

After generating a string of passwords with OpenSSL, add to the Cobbler configuration file (/etc/cobbler/settings), replacing the default_password_crypted field:

# OpenSSL passwd-1-salt ' random-phrase-here ' 1234567 '

$1$random-p$/pl7qz2d5uvh9gzhj2lyt1

# vi/etc/cobbler/settings

default_password_crypted: "$1$random-p$/pl7qz2d5uvh9gzhj2lyt1"

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

10. Install Cman Start power management function

# yum Install Cman

11. Check the Cobbler installation environment

# Cobbler Check

# Cobbler Sync

Third, import ISO file

1. Mount the ISO image to the/meida directory

#mount/dev/cdrom/media/

2. Import the client's OS from ISO. This will automatically set the "x86_64" and name it Centos6.2

#cobbler Import--path=/media--name=centos6.2--arch=x86_64

It takes a little time, don't worry. To view the/var/www/cobbler/ks_mirror/centos6.2-x86_64/directory file generation situation

# Cobbler Sync

# Cobbler List

Distros:

Centos6.2-x86_64

Profiles

Centos6.2-x86_64

Systems

Repos

Images

Mgmtclasses:

Packages

Files

Iv. Deployment Testing

Create a virtual machine test and set up the virtual machine as a network PXE boot

This article is from the "Hanyun.fang" blog, make sure to keep this source http://hanyun.blog.51cto.com/1060170/1588840

Cobbler Batch Automatic network installation CentOS

Related Article

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.