CentOS 6.5 Installation and configuration cobbler

Source: Internet
Author: User
Tags iptables

Cobbler is an open source project that is used to deploy and install systems. Cobbler is not just a PXE server, he can also manage DNS and DHCP. In a general data center or production environment, DHCP is not allowed, but PXE requires DHCP, so we assign IP here based on the MAC address so that DHCP does not affect the existing network.

1. First Close SELinux

sudo sed-i '/selinux/s/enforcing/disabled/'/etc/selinux/config

Reboot Linux System

2. Close Firewall iptables

sudo chkconfig iptables off
sudo chkconfig ip6tables off
sudo/etc/init.d/iptables stop
sudo/etc/init.d/ Ip6tables stop

3. Install Epel Package

sudo yum install http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

4. Install Cobbler and the third party toolkit it needs


Set up several services to start automatically after Setup completes

sudo chkconfig httpd on
sudo chkconfig dhcpd in
sudo chkconfig cobblerd on

sudo service httpd start
sudo s Ervice cobblerd Start

Note: DHCPD should fail to start at this time because DHCP has not been configured.

5. Configure
5.1 Modification/etc/xinetd.d/tftp

Disable = yes
=> 
disable = no

5.2 Modification/etc/xinetd.d/rsync

Disable = yes
=>
disable = no

5.3 Edit the/etc/cobbler/settings file and set the following items, where 192.168.145.102 is the current machine IP.

server:192.168.145.102
next_server:192.168.145.102
pxe_just_once:1
manage_rsync:1
manage_dhcp: 1

5.4 Set the default root user's Secret

$ sudo openssl passwd-1-salt ' random-phrase-here ' Letmein '

Then replace the results in the/etc/cobbler/settings file with the
Default_password_crypted:

5.5 Set the password for cobbler Web Access

sudo htdigest/etc/cobbler/users.digest "Cobbler" cobbler

5.6 Edit/etc/cobbler/dhcp.template file, below is the configuration information of my change section

...
Subnet 192.168.145.0 netmask 255.255.255.0 {
option routers 192.168.145.102;
Option Domain-name-servers 192.168.145.1;
Option Subnet-mask 255.255.255.0;
#range DYNAMIC-BOOTP 192.168.145.150 192.168.145.200;
Default-lease-time 21600;
Max-lease-time 43200;
Next-server $next _server;
FileName "/pxelinux.0";
Host Test {# Specifies the IP address hardware Ethernet 08:00:27:2C:30:8C for the specified machine
;     
fixed-address 192.168.145.155;
}
}
...

Note: If you already have a DHCP server in the existing network segment, you need to comment out the range DYNAMIC-BOOTP, otherwise there will be a conflict. This place needs special attention, to be set according to your network situation.


5.7 Restart Service

sudo service xinetd restart
sudo service httpd restart
sudo service cobblerd restart

5.8 Starting and testing cobbler

sudo cobbler get-loaders
sudo cobbler check

If there is an error at this point, cobbler will prompt you to fix it according to the prompts. However, any modification to the parameters requires that the following command be used to make it effective

sudo cobbler sync

5.9 Web Test

Access Http://192.168.145.102/cobbler_web
username/password: Cobbler/letmein

6. Import System Mirrors
This assumes that centos-6.6-x86_64 is used to test

sudo mount-t auto-o loop/home/kongxx/share/os/centos-6.6-x86_64-bin-dvd1.iso/mnt
sudo cobbler import--path=/mnt --name=centos-6.6--arch=x86_64

After you run these two commands, you can use the following command to view the

$ sudo cobbler distro list
$ sudo cobbler profile list

You can also view them through the distros and Profiles of the Web interface.

7. Automatic Installation System
Because of testing in a home virtual machine, it is impossible to use IPMI to manage physical machines. Here's just a test. The new virtual machines can be PXE-driven to install the system.

Use VirtualBox to create a virtual machine with network settings that use the same bridging mode as above. However, in the "Virtual machine settings-> System-> Boot order," the network hook up and move up to the first place, and then start the virtual machine. At this point you can enter the Cobbler network installation interface, select the centos-6.6-x86_64 created above and then install it automatically. After loading, remember to change the virtual machine boot sequence back to the hard drive boot first, then you can start the newly installed virtual machine.







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.