Automated O & M tool cobbler

Source: Internet
Author: User
Tags rsync

Cobbler is a fast network-based Linux installation service. It also supports Windows installation on the network after adjustment. This tool is developed in Python and is small and lightweight (only 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 API interfaces to facilitate secondary development and use.

# Yum install cobbler # service httpd start File Server [[email protected] DHCP] # service cobblerd start cobbler [[email protected] ~] # Cobbler check whether the cobbler environment is normal the following are potential configuration items that you may want to fix: 1: the 'server' field in/etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work. this shoshould be a resolvable hostname or IP for the boot server as reachable by all machines that will use it. 2: For PXE to be functional, the 'next _ Server' field in/etc/cobbler/settings must be set to something other than 127.0.0.1, and shoshould match the IP of the boot server on the PXE network. 3: Some network boot-loaders are missing from/var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a * recent * version of The syslinux package installed and can ignore this message entirely. files in this directory, shocould you want to support all ubuntures, shocould include pxelinux.0, menu. c32, elilo. EFI, and yaboot. the 'cobbler get-loaders' command is the easiest way to resolve these requirements. 4: Change 'disable' to 'no' in/etc/xinetd. d/rsync 5: debmirror package is not installed, it will be required to manage Debian deployments and repositories 6: ksvalidator was not found, install pykickstart 7: the default password used by the sample templates for newly installed machines (default_password_crypted in/etc/cobbler/settings) is still set to 'jobbler' and shocould be changed, try: "OpenSSL passwd-1-salt 'random-phrase-Here ''ur-password-Here '" to generate new one 8: Fencing tools were not found, and are required to use the (optional) power management features. install CMAN or fence-agents to use them

We can see that there are a total of eight errors, which need to be manually repaired.

[[Email protected] ~] # Vim/etc/cobbler/setting edit file server: 172.16.17.12 modify next_server: 172.16.17.12 [[email protected] ~] # Yum list syslinux check if syslinux is installed. Loaded plugins: fastestmirror, refresh-packagekit, security loading mirror speeds from cached hostfile installed packages syslinux is installed here. x86_64 4.02-8. el6 @ base [[email protected] ~] # Chkconfig rsync on enable rsync to start [[email protected] ~] # Yum install pykickstart change default password [[email protected] ~] # OpenSSL passwd-1-salt 'openssl rand-hex 4' password: $1 $28ad5f04 $ q/rtkoo5lqsxaixfuutz31 replace the above string copy with the default encryption password default_password_crypted: "$1 $28ad5f04 $ q/rtkoo5lqsxaixfuutz31. "[[email protected] ~] # Service cobblerd restart stopping cobbler daemon: [OK] Starting cobbler daemon: [OK] [email protected] ~] # Cobbler check the following are potential configuration items that you may be want to fix: 1: Some network boot-loaders are missing from/var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a * recent * version of The syslinux package installed and can ignore this message entirely. fil Es in this directory, shocould you want to support all ubuntures, shocould include pxelinux.0, menu. c32, elilo. EFI, and yaboot. the 'cobbler get-loaders' command is the easiest way to resolve these requirements. 2: debmirror package is not installed, it will be required to manage Debian deployments and repositories 3: Fencing tools were not found, and are required to use the (optional) Power Man Agement features. install CMAN or fence-agents to use themrestart cobblerd and then run 'cobbler sync' to apply changes. [[email protected] syslinux] # cp-R. /*/var/lib/cobbler/loaders/copy the required file to edit/etc/cobbler/setting. Do not use the built-in tftpmanage_tftpd: 0 [[email protected] ~] # Yum-y install DHCP [[email protected] ~] # Cp/usr/share/doc/dhcp-4.1.1/DHCPD. conf. Sample/etc/DHCP/DHCPD. conf edit the DHCP configuration file [[email protected] ~] # Vim/etc/DHCP/DHCPD. confoption domain-name "example.org"; Option domain-name-servers 172.16.0.1; default-lease-time 43200; max-lease-time 86400; subnet 172.16.0.0 netmask 255.255.0.0 {range 172.16.100.101 172.16.100.200; option routers 172.16.17.12;} next-server 172.16.17.12; filename = "pxelinux.0"; [email protected] ~] # Service DHCPD restart start DHCP starting DHCPD: [OK] [[email protected] ~] # Yum-y install TFTP-server install TFTP loaded plugins: fastestmirror, refresh-packagekit, security loading mirror speeds from cached hostfile setting up install process package tftp-server-0.49-7.el6.x86_64 already installed and latest version nothing to do [[email protected] ~] # Chkconfig TFTP on start TFTP [[email protected] ~] # Service xinetd start starting xinetd: [OK] [[email protected] ~] # Export distro-help disrto command usage ==== cobbler distro add guest distro copy guest distro edit guest distro find cobbler distro list cobbler distro remove cobbler distro rename cobbler distro report [email protected] ~] # Mount-r/dev/CDROM/mnt mount the image file [[email protected] ~] # Cobbler import-help import command usage: Cobbler [Options] Options:-H, -- help show this help message and exit -- arch = arch OS architecture being imported -- breed = breed the breed being imported -- OS-version = OS _version the version being imported -- Path = path local path or rsync location -- name = Name, ex 'rhel-5' -- available-as = available_as tree is here, Don't mirror -- kickstart = kickstart_file assign This kickstart file -- rsync-flags = rsync_flags pass additional flags to rsync [[email protected] ~] # Cobbler import -- Path =/mnt -- name = centos-6.5-x86_64 create Yum source task started: 2014-09-29_232236_import task started (ID = media import, time = mon Sep 29 23:22:36 2014) found a candidate signature: breed = RedHat, version = rhel6 found a matching signature: breed = RedHat, version = rhel6 adding distros from path/var/www/cobbler/ks_mirror/centos-6.5-x86_64: creating new distro: centos-6.5-x86_64 trying symlink :/ Var/www/cobbler/ks_mirror/centos-6.5-x86_64->/var/www/cobbler/links/centos-6.5-x86_64 creating new profile: centos-6.5-x86_64 associating repos checking for rsync repo (s) checking for RHN repo (s) checking for Yum repo (s) Starting descent into/var/www/cobbler/ks_mirror/centos-6.5-x86_64 for centos-6.5-x86_64 processing repo: /var/www/cobbler/ks_mirror/The centos-6.5-x86_64 need to process repo/C OMPs:/var/www/cobbler/ks_mirror/centos-6.5-x86_64 looking for/var/www/cobbler/ks_mirror/centos-6.5-x86_64/repodata/* comps *. XML running: createrepo-C cache-s Sha -- groupfile/var/www/cobbler/ks_mirror/centos-6.5-x86_64/repodata/b4e0b9342ef85d3059ff095fa7f140f654c2cb492837de689a58c581207d9632-c6-x86_64-comps.xml/var/www/cobbler/ks_mirror/centos-6.5-x86_64 named Ed on stdout: spawning worker 0 w Ith 3995 pkgs workers finished gathering worker resultssaving primary metadata SAVING file lists metadata saving other metadata generating SQLite DBS completereceived on stderr: *** task complete *** takes a long time, please wait patiently [email protected] ~] # Cobbler diastrlist centos-6.5-x86_64

 

Download and configure the Kickstart File

[[Email protected] ~] # Wget http: // 172.16.0.1/centos6.x86 _ 64.cfg -- 2014-09-29 23:37:30 -- http: // 172.16.0.1/centos6.x86 _ 64.cfg connecting to 172.16.0.1: 80... connected. HTTP request sent, awaiting response... 200 OK length: 2823 (2.8 k) [text/plain] saving to: "centos6.x86 _ 64. CFG "100% [========================================== ===========================================>] 2,823 --. -K/S in 0 s 23:37:31 (62.8 Mb/s)-"centos6. X86_64.cfg "saved [2823/2823] [[email protected] ~] # Ksvalidator centos6.x86 _ 64.cfg verify whether there is a syntax error [[email protected] ~] # Cobbler profile add -- name = centos-6.5-x86_64-basic -- distro = centos-6.5-x86_64 -- kickstart =/root/centos6.x86 _ 64.cfg [[email protected] ~] # Cobbler profile list centos-6.5-x86_64 centos-6.5-x86_64-basic [[email protected] ~] # Cobbler sync can automatically install the operating system on a large-scale host without an operating system. [[Email protected] ~] # Yum install cobbler-web [[email protected] ~] # Cd/etc/cobbler/[[email protected] cobbler] # Vim modules. conf [authentication] module = authn_pam [[email protected] cobbler] # useradd cobbleradmin Add a user [[email protected] cobbler] # passwd cobbleradmin set the password changing password for user cobbleradmin. new Password: Bad password: it is based on a dictionary wordbad password: Is Too simpleretype new password: passwd: All authentication tokens updated successfully. [[email protected] cobbler] # Vim users. conf [admins] admin = "cobbleradmin" cobbler = ""


Enter in the browser to view

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4B/BD/wKioL1QxcZHyxOg2AAFUavOyt9s410.jpg "Title =" image 001.png" alt = "wkiol1qxczhyxog2aafuavoyt9s410.jpg"/>

 


Automated O & M tool cobbler

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.