Install and configure Cobbler in CentOS 6.5

Source: Internet
Author: User

Install and configure Cobbler in CentOS 6.5

Cobbler is an open-source project used to deploy and install the system. Cobbler is not only a pxe Server, but also can manage dns and dhcp. Dhcp is not allowed in data centers or production environments, but pxe needs to use dhcp. Therefore, IP addresses are allocated based on the mac address so that dhcp will not affect the existing network.

1. Disable selinux first

Sudo sed-I '/SELINUX/s/enforcing/disabled/'/etc/selinux/config
Restart linux


2. Disable the firewall iptables

Sudo chkconfig iptables off
Sudo chkconfig ip6tables off
Sudo/etc/init. d/iptables stop
Sudo/etc/init. d/ip6tables stop
3. Install the 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 requires

Sudo yum install cobbler-web xinetd pykickstart cman dhcp tftp-server bind
After the installation is complete, you need to set several services to automatically start

Sudo chkconfig httpd on
Sudo chkconfig dhcpd on
Sudo chkconfig cobblerd on

Sudo service httpd start
Sudo service cobblerd start
Note: At this time, dhcpd should fail to be started because dhcp has not been configured.


5. Configuration
5.1 Modify/etc/xinetd. d/tftp

Disable = yes
=>
Disable = no


5.2 Modify/etc/xinetd. d/rsync

Disable = yes
=>
Disable = no


5.3 edit the/etc/cobbler/settings file and set the following items. 192.168.145.102 is the IP address of the current machine.

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 secret

$ Sudo openssl passwd-1-salt 'random-phrase-here ''letmein'

Replace the result with the one in the/etc/cobbler/settings file.
Default_password_crypted:


5.5 set the Cobbler Web Access Password

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

5.6 edit the/etc/cobbler/dhcp. template file. The configuration information of the modified part is as follows:

...
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 limit 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 {# specify an IP address for the specified Machine
Hardware ethernet 08: 00: 27: 2C: 30: 8C;
Fixed-address 192.168.145.155;
}
}
...

Note: If the DHCP server already exists in the current network segment, You Need To comment out range dynamic-bootp; otherwise, there will be a conflict. In this case, you must pay special attention to the settings based on your network conditions.

5.7 restart the service

Sudo service xinetd restart
Sudo service httpd restart
Sudo service cobblerd restart

5.8 start and detect cobbler

Sudo cobbler get-loaders
Sudo cobbler check
If an error occurs, the cobbler will prompt you to fix it as prompted. However, you must use the following command to make any modifications to the parameter take effect.

Sudo cobbler sync
5.9 Web Testing

Access http: // 192.168.145.102/cobbler_web
User name/password: cobbler/Letmein

6. Import System Images
Here we assume that the CentOS-6.6-x86_64 is used for testing

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 running these two commands, you can use the following command to view

$ Sudo cobbler distro list
$ Sudo cobbler profile list
You can also view Distros and Profiles on the Web interface.

7. Automatic System Installation
Because the test is performed on a virtual machine at home, IPMI cannot be used to manage the physical machine. Here we only test that the new virtual machine can automatically install the system through PXE.

Use VirtualBox to create a virtual machine. The network settings use the same bridging mode as above. However, in "Virtual Machine Settings-> system-> startup sequence", you can hook up the network and move it to the first place, and then start the virtual machine. Now you can enter the Cobbler network installation interface, select the CentOS-6.6-x86_64 created above and then you can automatically install. After installation, remember to change the VM startup sequence back to hard disk boot priority, and then you can start the newly installed virtual machine.

 

Cobbler installation and configuration for O & M Automation

Cobbler configuration in RHEL5.5

Automated O & M deployment of Cobbler Service Installation

Use Cobbler to quickly install CentOS in batches

Install and deploy Cobbler on CentOS 6.3

Cobbler batch deployment 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.