Cobbler automatic machine, Cobbler Web management of two authentication methods login

Source: Internet
Author: User

Cobbler is an Open Source project that is developed using Python to provide a fully automated batch to build Linux quickly by centralizing all the services involved in the deployment system The network environment of the system,

Cobbler provides DHCP management,YUM Management, power management and other functions, in addition to support command line management,WEB Interface Management, Cobbler related packages are provided by the Epel source. EPEL (Extra pavkages for Enterprise Linux, an additional package for corporate Linux) is a software warehouse project maintained by the Fedora team. To provide Rhel/centos with a package that is not provided by default, installing cobbler requires a centos-brought network Yum source in addition to the Epel source to provide dependent packages.

Experimental environment;

1) VMware Workstation virtual machine environment

2) CentOS7 system Virtual PC as Cobbler server, network card using NAT connection mode,

1, modify the server network adapter configuration ens33, instead of DHCP to obtain IP automatically

Then restart the network service to get the native IP of 192.168.195.128



2, import Epel source,

using the 7th Generation Enterprise Linux, this link can be used to get the latest version of the ' Epel-release ' package;https://dl.fedoraproject.org/pub/epel/ epel-release-latest-7.noarch.rpm

With 6th Generation Enterprise Linux, you can get the latest version of the ' Epel-release ' package via this link: https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

I pre-epel the source to the PC, and then use the WINSCP tool to copy to the virtual machine pc,

Then use the RPM command to install the Epel source, you can see the/etc/yum.repos.d/directory added Epel files.

3, use the Yum command to install cobbler and its related service packages,

Use the Systemctl command to start the Apache service, cobbler service, turn off the firewall, turn off enhanced features,

4, check the cobbler configuration,

Use cobbler Check to set the cobbler.

The following content is to the effect

(1) Edit the/etc/cobbler/settings file, locate the server option, modify the IP address to provide the service, that is, the native IP, cannot be 127.0.0.1

(2) Edit the/etc/cobbler/settings file, find the Next_server option, modify the IP address of this machine, and it cannot be 127.0.0.1

(3) This one can be ignored,

(4) Edit the/etc/xinetd/tftp file to change the configuration of the Disable field in the file from Yes to No

(5) Perform cobbler get-loaders, the system will automatically download loader program, complete the prompt repair work.

(6) using the SYSTEMCTL command to open the RSYNCD service,

(7) This does not involve installing the Debian system, which can be ignored.

(8) Modify the Cobbler user's initial password, you can use the following command to generate the password. and replace the password in the/etc/cobbler/settings file with the generated password,

(9) Prompt fence device not found. can be ignored

Depending on the check settings above, we are told we need to initialize the cobbler configuration, and then we follow the steps to set it up as required.

Edit the/etc/cobbler/settings file, locate the server option, next-server option, modify the IP address to provide the service,


Edit the/etc/xinetd/tftp file, change the configuration of the Disable field in the file from Yes to No, and then start the XINETD service




Use the Systemctl command to turn on the rsync service

Set the initial password of the Cobbler user, first use the command, OpenSSL passwd-1-salt ' any character ' password ' (is the number 1, not the letter L) to generate an encrypted password, and then replace the encrypted string with the default_password_crypted: The original string.

Set up the DHCP service, first modify the Cobbler configuration, let cobbler to manage the DHCP service, when doing custom configuration, you need to modify the DHCP-related configuration to cooperate with PXE boot.

After the modification is complete, cobbler generates the Dhcp.cof file according to/etc/cobbler/dhcp.template, which is a template that cobbler manages DHCP, ensuring that the DHCP-assigned IP and cobbler are in the same network segment.

Just modify the section of the label below, and the remainder will be maintained by default



After modifying all the profiles using Cobbler Sync Sync configuration, it is best to perform a cobbler sync sync once each time the profile is modified to take effect. Perform cobbler get-loaders, the system automatically downloads the loader program, which takes several minutes to wait here.




Restart all related services at this point,

Import ISO image file

Import the required packages from the ISO installation image using the Cobbler's import command. The data file is large and needs to wait.

command format; Cobbler import--path= Mirror path--name= install boot name--arch=32 bit or 64-bit

--path represents the directory to which the image is mounted

--name represents the name defined for the installation source

--arch indicates whether the installation source is 32-bit or 64-bit and currently supports the option: X86,x86_64,ia64.

Cobbler copies all the installation files in the image to a local copy and places it under/var/www/cobbler/ks_mirrors. After you import the image, you can view the results of the import through the Cobbler list.

Where distro represents a release version,

Profile represents the Kickstart configuration file


The TFTP server's shared directory also has the files required to start Linux, since the kernel vmlinuz and initialization image files initrd.img copied to the TFTP shared directory when importing from the OS Installation CD.

You can use the tree command to view (the system does not have this command by default, you need to install the appropriate package separately)

Final verification Cobbler automatic machine

Then create a new virtual machine PC for verification, do not use mirroring, network connection mode to select NAT, note that memory selection of more than 2G (otherwise, due to insufficient memory and installation failure). Then open the new virtual opportunity appears cobbler screen, select the second type of carriage to continue to wait.

Wait a while the system will be installed automatically, after the case, enter the root user and the previously established password to log in.

Web Management for Cobbler

Cobbler after the installation system is complete, we can also use the Web interface to manage the Cobbler,cobbler web as a very friendly front end. Just install the Cobbler_web package.

Use the Web interface to add/Remove Distro,profile, and to view and edit Distro,profile,repos,kickstart files.

Cobbler Web support a variety of authentication methods, the following two types of user authentication login cobbler the way of the Web

1) Use the Cobbler default Authn_configfile module authentication method

The authentication and authorization configuration of the Cobbler Web interface is located in the file/etc/cobbler/modules.conf, cobbler authentication by default this way

You can add cobbler users and passwords directly using the Htdigest command

Then restart the Cobbler service, Apache service can be.

2) using Authn_pam module authentication method

First, you need to modify the authentication method in the configuration file/etc/cobbler/modules.conf.

Then add the system user

Then, in file/etc/cobbler/users.conf, add the newly added WebUser user to the Admins group with full access rights

After the configuration is complete, restart the Cobbler,apache service and you can log in to the Cobbler Web page as WebUser.

Use the Https://192.168.195.128/cobbler_web address to access the Cobbler Web page, log in using the set user and password, and configure it on the Web page.




Cobbler automatic machine, Cobbler Web management of two authentication methods login

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.