Cobbler installation and configuration for O & M Automation

Source: Internet
Author: User

Cobbler is a fast network-based linux installation service. It also supports windows installation on the network after adjustment. This tool is developed using python and is small and lightweight with 15 K lines of code). You can use simple commands to configure the PXE network installation environment, and manage DHCP, DNS, and yum package images. Cobbler supports command line management and web interface management. It also provides APIs to facilitate secondary development. Unlike Kickstart, cobbler does not enable dhcp in the LAN, which causes some machines to terminate the startup because it starts from pxe by default and loads tftp content after the server is restarted.Cobbler installation and deployment configurationEnvironment preparation: 1. install epel rpm-uvh'http: // ipv2. install dhcp Service yum-y install dhcp. 3. install other services, and install tftp, rsync, xinetd, httpd. Therefore, if these packages are not installed during system installation, install them manually. 4. Disable selinux sed-I '/SELINUX/s/enforcing/disabled/'/etc/selinux/config and restart it, enable selinux settings to take effect. cobbler installation configuration 1. cobbler installation yum-y install cobbler 2. cobbler configuration start cobbler #/etc/init. d/cobblerd start httpd service #/etc/init. d/httpd start check Configuration. After the cobbler check is executed, log 650 similar to this will appear.) this. width = 650; "style =" background-image: none; border-right-0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; Border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px "title =" clip_image001 "border =" 0 "alt =" clip_image001 "src =" http://www.bkjia.com/uploads/allimg/131227/194JT622-0.jpg "width =" 672 "height =" 104 "/> major changes: 1, edit the/etc/cobbler/settings file, find the server option, and change it to an appropriate ip address. Set the ip address of this instance to 192.168.10.1 2, and edit the/etc/cobbler/settings file, find the next_server option and change it to the appropriate ip address. Set the ip address to 192.168.10.1 3 and SELinux for this instance. If SELinux has been disabled, you do not need to worry about 4. Execute cobbler get-loaders and the system will automatically download the loader program to complete the fix in Tip 4. 5. edit/etc/xinetd. d/tftp file, change the disable field configuration in the file from yes to no 6, edit/etc/xinetd. in the d/rsync file, change the disable field configuration in the file from yes to no 7, and enable ports 25151, 80, and in iptables. If it is only used in the internal environment, we recommend that you directly turn off the firewall 8 and prompt that debmirror is not installed. This prompt can be ignored if you are not installing a system like debian, if you need to install, is: http://rpmfind.net/linux/rpm2html/search.php? Query = debw.centos 6 use the RHEL 5 package. 9. Change the default password of a cobbler user. Use the following command to generate a password and replace the password in/etc/cobbler/settings. Password generation command: openssl passwd-1-salt 'random-phrase-here ''your-password-here' where "random-phrase-here" indicates that all the prompts for the interference code are fixed, run/etc/init. d/cobblerd restartUse of cobbler1. import the system image cobbler import -- path =/mnt -- name = rhel6.1 _ x86_64 cobbler will copy the image to the local device, in the rhel6.1 _ x86_64 directory under/var/www/cobbler/ks_mirrors. A release version named rhel6.1 _ x86_64 is created, and a profile file named rhel6.1 _ x86_64 is created, the secondary path can be used as a future yum source. 2. Configure dhcp. First, modify the cobbler configuration to allow cobbler to manage the dhcp service and edit the file/etc/cobbler/settings manage_dhcp: 1. Next, modify/etc/cobbler/dhcp. template. This file is a template for cobbler to manage dhcp. For this file, you only need to modify the following parts: subnet 192.168.10.0 netmask 255.255.255.0 {option routers 192.168.10.1; option domain-name-servers 8.8.8.8; option subnet-mask limit 255.0; range dynamic-bootp 192. 168.10.100 192.168.10.254; filename "/pxelinux.0"; default-lease-time 21600; max-lease-time 43200; next-server $ next_server;} the remaining parts must be maintained by default. So far, all the preparations have been completed, and the next step is to start the service. In the previous debugging process, many services have been started. Here you only need to start the xinetd service:/etc/init. d/xinetd start: Synchronize cobbler configurations. Execute cobbler sync. cobbler will automatically perform initialization, remove existing startup items, and copy the loader file according to the template. Then generate the pxe configuration file, generate the dhcp configuration file, and then restart the dhcp service. 3. Setting profile can be understood as classifying by role. Cobbler profile add -- name = webserver -- distro = rhel6.1 _ x86_64 kickstart =/var/lib/cobbler/kickstarts/webserver. ks cobbler ks files are stored in/var/lib/cobbler/kickstarts/by default. You can customize ks file instances according to different requirements # platform = x86, AMD64, or Intel EM64T # System authorization information auth -- useshadow -- enablemd5 # System bootloader configuration bootloader -- location = mbr # Partition clearing information clearpart -- all -- initlabel # Use text mode install text # Firewall configuration firewall -- enabled # Run the Setup Agent on first boot firstboot -- disable # System keyboard us # System language lang en_US # Use network installation url -- url = $ tree # Reboot after installation reboot # Root password rootpw -- iscrypted $ default_password_crypted # SELinux configuration selinux -- disabled # Do not configure the X Window System skipx # System timezone Asia/Shanghai # Install OS instead of upgrade install # Clear Master Boot record zerombr # Allow anaconda to partition the system as needed clearpart -- all -- initlabel part/boot -- fstype = ext4 -- size = 256 part swap -- size = 1024 part/-- fstype = ext4 -- size = 10240 part/data -- fstype = ext4 -- grow -- size = 200% packages @ base @ core % end % post mkdir/data/sh mkdir/data/applogs mkdir/data/appbak unlike the ks file of kickstart, you can write different ks files according to different business needs, so that you can quickly deploy the application to the server and then install the system. Unlike kickstart, you can select the desired operating system to install and create more profile 650.) this. width = 650; "style =" background-image: none; border-right-0px; padding-left: 0px; padding-right: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px "title =" clip_image002 "border =" 0 "alt =" clip_image002 "src =" http://www.bkjia.com/uploads/allimg/131227/194JU457-1.png "width =" 523 "height =" 309 "/>

This article from the "Dream To Run" blog, please be sure to keep this source http://liyingjie.blog.51cto.com/2850660/1160264

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.