Cobbler Automated Batch Deployment system

Source: Internet
Author: User
Tags rsync

1, the use of Yum Epel source installation of Cobbler, DHCP, httpd and other services and related dependent packages


[Email protected] ~]# wget-c http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

[Email protected] ~]# RPM-IVH epel-release-6-8.noarch.rpm

[email protected] ~]# Yum Clean all

[email protected] ~]# Yum Makecache

[[email protected] ~]# yum install cobbler cobbler-web httpd rsync tftp-server xinetd DHCP python-ctypes debmirror pykicks Tart

2. Modify the Cobbler configuration file/etc/cobbler/settings


#DHCP服务器地址

next_server:192.168.186.128

#cobbler服务器地址

server:192.168.186.128

#将DHCP设置为cobbler管理

Manage_dhcp:1

#将rsync设置为cobbler管理

Manage_rsync:1

#将tftpd设置为cobbler管理

Manage_tftpd:1

#更该端口号 (You can also use the default port number 80th), the port number of the httpd configuration file must be changed to the same

http_port:8090

3, modify the default password (the password password is the newly installed machine root user login password)


[[Email protected] ~] #openssl passwd-1-salt ' random-phrase ' password '

$1$random-p$sfftrctxkksdz.sdr8mdg0

Replace the production password with the default password in the settings configuration file

default_password_crypted: "$1$random-p$sfftrctxkksdz.sdr8mdg0"

4. Modify the TFTP and Rsync service profile to open the TFTP and rsync service and change the disable from "Yes" to "no"


[Email protected] ~]# cat/etc/xinetd.d/tftp

Service TFTP

{

Disable = no

...........................

[Email protected] ~]# Cat/etc/xinetd.d/rsync

Service rsync

{

Disable = no

............................

5. Modify the DHCP template/etc/cobbler/dhcp.template provided by cobbler and replace the DHCP configuration file/etc/dhcp/dhcpd.conf


Subnet 192.168.186.0 netmask 255.255.255.0 {#修改为自己需求的网段

Option routers 192.168.186.2; #该网段的router地址, Gateway

Option Domain-name-servers 192.168.1.12; #DNS服务器地址

Option Subnet-mask 255.255.255.0; #掩码

Range DYNAMIC-BOOTP 192.168.186.100 192.168.186.254; #允许分配的IP段

Default-lease-time 21600;

Max-lease-time 43200;

Next-server $next _server;

Class "Pxeclients" {

Match if substring (option vendor-class-identifier, 0, 9) = "Pxeclient";

If option Pxe-system-type = 00:02 {

FileName "Ia64/elilo.efi";

} else if option Pxe-system-type = 00:06 {

FileName "Grub/grub-x86.efi";

} else if option Pxe-system-type = 00:07 {

FileName "Grub/grub-x86_64.efi";

} else {

FileName "pxelinux.0";

}

}

}

6. Modify HTTPD Configuration


Httpd.conf listening port modified with settings same port

Listen 8090

#修改认证文件/etc/cobbler/modules.conf (the latest cobbler version doesn't seem to change)

[Authentication]

module = Authn_configfile

[Authorization]

module = Authz_allowall

[DNS]

module = Manage_bind

[DHCP]

module = Manage_isc

[TFTPD]

module = MANAGE_IN_TFTPD

Modify the SSL configuration of the/etc/httpd/conf.d/ssl.conf (add the following line if it is not available with the web side provided by cobbler)


<virtualhost *:8090>

<locationmatch "^/cobbler_web/*" >

Rewriteengine on

Rewriterule ^ (. *) Https://%{server_name}/%{request_uri} [R,l]

</LocationMatch>

</VirtualHost>

Modify Cobbler Web page Administration password "Web management address https://ip/cobbler_web user name Cobbler password Cobbler"


[Email protected] ~]# htdigest/etc/cobbler/users.digest "Cobbler" cobbler

7, check Cobbler installation conditions and start related services


Services that need to be started are httpd, DHCP, xinetd, cobbler, and need to turn off SELinux, IPtables. Other errors are resolved by cobbler check prompt


[Email protected] ~]# Cobbler Get-loaders

[Email protected] ~]# Cobbler Check//If there is an error, please follow the prompts to resolve the error

No configuration problems found. All systems go.

[[email protected] ~]# Cobbler Sync

[[Email protected] ~] #chkconfig--level httpd on

[[Email protected] ~] #chkconfig--level xinetd on

[[Email protected] ~] #chkconfig--level dhcpd on

[[Email protected] ~] #chkconfig--level cobblerd on

8, import the system image (first mounted after import)


[Email protected] ~]# mount/dev/cdrom/media/

[Email protected] ~]# Cobbler import--path=/media/--name=centos64--arch=x86_64

View Import Results

[[Email protected] ~] #cobbler distro List

Synchronize all configurations (synchronize data to DHCP/PXE and data directory) after completion

[[Email protected] ~] #cobbler Sync

9, the installation configuration is complete, the newly installed machine turns on PXE boot, the reinstall machine sets the first boot entry for PXE boot to complete the automatic installation.



650) this.width=650; "src=" Http://f.xiaomastack.com/uploads/2014/09/cobbler.png "alt=" Cobbler "/>


This article from "~" blog, declined reprint!

Cobbler Automated Batch Deployment system

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.