Install cobbler2.6 on CentOS6.9 for automated installation of Linux systems

Source: Internet
Author: User
Tags md5 encryption openssl aliyun

Install cobbler2.6 on CentOS6.9 for automated installation of Linux systems


Cobbler can deploy Linux systems in batches and implement unattended installations.

Cobbler-dependent services: Dhcp,tftp,http,pxe,kickstart

The port number of the service corresponds to dhcp--67,68;tftp--69;http--80;cobbler--25151


1. Environment readiness: Minimize installation of Centos6.9mini, configure fixed IP and local yum sources, turn off firewalls and SELinux

Iptables-f

Setenforce 0

Chkconfig iptables off

Vi/etc/selinux/config Change to Permissive


2. Set the Yum source and Epel source

Here the local CD is used as a Yum source, or you can use Ali source, as follows

Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-6.repo

Wget-o/etc/yum.repos.d/centos-base.repo Http://mirrors.aliyun.com/repo/Centos-7.repo


Cobbler installation requires the use of Epel source, where Ali's Epel source is used

Wget-o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-6.repo

Wget-o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-7.repo


3. Install the package corresponding to the above services

Yum install-y Cobbler cobbler-web pykickstart httpd DHCP tftp-server syslinux

Cobbler #cobbler程序包

Cobbler-web #cobbler的web服务包

Pykickstart #cobbler检查kickstart语法错误

httpd #Apache Web Services

DHCP #dhcp服务

Tftp-server #tftp服务

Syslinux#pxe相关文件, such as pxelinux.0


4. Edit the Cobbler configuration file

Vi/etc/cobbler/settings change the following parameters:

Default_kickstart:/VAR/LIB/COBBLER/KICKSTARTS/DEFAULT.KS

default_password_crypted: "$1$mf86/uhc$wvcicx2t6crbz2onwxyac."

Manage_dhcp:1

Manage_tftpd:1

next_server:192.168.10.24

server:192.168.10.24


Change Default_password default password, that is, set the root password, in the format of $ MD5 encryption, can be generated through the OpenSSL command, as follows:

OpenSSL Passwd-1–salt CentOS

Enter a password, such as Redhat


5.cobbler Configuration Check, follow the instructions to change the settings gradually, set the option to ignore

[Email protected] ~]# Cobbler Check

The following is potential configuration items and that's want to fix:


1:the ' server ' field in/etc/cobbler/settings must is set to something other than localhost, or kickstarting features WI  ll not work. This should is a resolvable hostname or IP for the boot server as reachable by all machines that would use it.

2:for PXE to be functional, the ' next_server ' field in/etc/cobbler/settings must is 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. 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 is 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 so you have installed a *recent* version of the  Syslinux package installed and can ignore this message entirely. Files in this directory, should want to support all architectures, should include pxelinux.0, MENU.C32, Elilo.efi, and Yaboot. The ' Cobbler get-loaders ' command is the easiest-to resolve these requirements.

6:change ' disable ' to ' no ' in/etc/xinetd.d/rsync

7:file/etc/xinetd.d/rsync does not exist

8:since Iptables May is running, ensure, 80/443, and 25151 are unblocked

9:debmirror package isn't installed, it'll be required to manage Debian deployments and repositories

10:the default password used by the sample templates for newly installed machines (default_password_crypted In/etc/cobb Ler/settings) is still set to ' cobbler ' and should be changed, try: "OpenSSL passwd-1-salt ' Random-phrase-here ' Your-pa Ssword-here ' "To generate new one

11:fencing tools were not found, and is 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.


If you do not install Debian system can also ignore 9.debmirror ... Error

Because the network problem cannot download the file through the Cobbler get-loaders command, you can copy the native file directly. (This step can also be omitted, using the Cobbler Sync command will automatically perform the following copy operation)

cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/

cp/usr/share/syslinux/menu.c32/var/lib/tftpboot/


Restart the Cobblerd service and perform a synchronous operation

Service Cobblerd Restart

Cobbler Sync

Hint Error: 2.service DHCPD is not running


6. Configure the DHCP service, change the DHCP template file that comes with cobbler, change the subnet address segment and address range

Vi/etc/cobbler/dhcp.template

Subnet 192.168.10.0 netmask 255.255.255.0 {

Option Subnet-mask 255.255.255.0;

Range DYNAMIC-BOOTP 192.168.10.100 192.168.10.254;


Restart the Cobbler service again and perform sync sync, cobbler will automatically synchronize the DHCP configuration

Restart the DHCPD service to start the XINETD service

Service DHCPD Restart

Service xinetd Start


7. Set up service boot

Cobbler default is set to boot, need to set httpd and DHCPD service boot up

Chkconfig DHCPD on

Chkconfig httpd on


Check that all services are started properly, port 67,69,80,25151

Netstat-tuanlp

or SS-TUNLP


8. Import the installation files

Import the installation disc file because you need to wait a while to fully copy the disc file

Cobbler Import--path=/mnt/cdrom--name=centos6.9mini--arch=x86_64

Ll/var/www/cobbler/ks_mirror/centos6.9mini-x86_64


Replace the disc and import the centos6.9 installation disc file

Cobbler Import--path=/mnt/cdrom--name=centos7.3mini--arch=x86_64

Ll/var/www/cobbler/ks_mirror/centos7.3mini-x86_64


Query name after successful import

Cobbler List

Distros:

Centos6.9mini-x86_64

Centos7.3mini-x86_64

Profiles

Centos6.9mini-x86_64

Centos7.3mini-x86_64


View more information

Cobbler distro Report--name centos6.9mini-x86_64

Cobbler Profile Report--name centos6.9mini-x86_64


After the import is successful, the cobbler automatically generates the KS file and the menu boot menu file, which minimizes the installation system by default.

/var/lib/cobbler/kickstarts/sample_end.ks

/var/lib/tftpboot/pxelinux.cfg/default


If you are importing a mini installation disc, you will need to change the KS file by one of the parameters, that is, add%packages behind--nobase

Vi/var/lib/cobbler/kickstarts/sample_end.ks

%packages--nobase


9. Adding a custom KS configuration file

Change your own KS profile parameters, change the URL--url= $tree


Add a profile, which is the Startup menu item, and specify a custom KS file

Cobbler profile Add--name=centos6.9-custom--kickstart=/var/lib/cobbler/kickstarts/ks-69mini.ks--distro= Centos6.9mini-x86_64


View New menu items

Cobbler Profile List

Centos6.9-custom

Centos6.9mini-x86_64

Centos7.3mini-x86_64


Delete a Start menu item

Cobbler Profile Remove--name=centos7.3-x86_64


Now that all the cobbler configurations are complete, you can create a new virtual machine test Network unattended installation of the Linux system.

This article is from the "Rackie" blog, make sure to keep this source http://rackie386.blog.51cto.com/11279229/1950307

Install cobbler2.6 on CentOS6.9 for automated installation of Linux systems

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.