Cobbler实现自动化安装操作系统

一、cobbler简介

cobbler是实现自动化安装操作系统的工具。它解决了PXE安装时的弊端(只能实现单一操作系统的安装)。实际上,cobbler是对PXE二次封装可实现多版本,多环境操作系统安装的高级抽象工具。

工作原理大致如下:

实际上,cobbler是对PXE的二次封装。cobbler可以自动的实现PXE配置中的某些手动过程。PXE的工作原理大致如下:

关于PXE具体配置,可参考

二、cobbler安装配置

说明:

目标主机:172.16.10.9

操作系统:CentOS 6.5

安装、初步配置cobbler##1、安装cobbler#说明,cobbler的rpm安装包,是由epel源提供yuminstallcobbler-y2、安装并启动httpdyuminstallhttpd-yservicehttpdstart3、启动cobblerd服务servicecobblerdstart4、配置cobbler##使用cobblerchenck命令,可以检查cobbler配置文件是否配置正确##cobblercheck首次会出现以下提示:Thefollowingarepotentialconfigurationitemsthatyoumaywanttofix:1:The’server’fieldin/etc/cobbler/settingsmustbesettosomethingotherthan\localhost,orkickstartingfeatureswillnotwork.Thisshouldbearesolvable\hostnameorIPforthebootserverasreachablebyallmachinesthatwilluseit.2:ForPXEtobefunctional,the’next_server’fieldin/etc/cobbler/settingsmust\besettosomethingotherthan127.0.0.1,andshouldmatchtheIPoftheboot\serveronthePXEnetwork.3:somenetworkboot-loadersaremissingfrom/var/lib/cobbler/loaders,youmayrun\’cobblerget-loaders’todownloadthem,or,ifyouonlywanttohandlex86/x86_64netbooting,youmayensurethatyouhaveinstalleda*recent*versionofthesyslinuxpackageinstalledandcanignorethismessageentirely.Filesinthisdirectory,shouldyouwanttosupportallarchitectures,shouldincludepxelinux.0,menu.c32,elilo.efi,andyaboot.The’cobblerget-loaders’commandistheeasiestwaytoresolvetheserequirements.4:change’disable’to’no’in/etc/xinetd.d/rsync5:debmirrorpackageisnotinstalled,itwillberequiredtomanagedebiandeploymentsandrepositories6:ksvalidatorwasnotfound,installpykickstart7:Thedefaultpasswordusedbythesampletemplatesfornewlyinstalledmachines(default_password_cryptedin/etc/cobbler/settings)isstillsetto’cobbler’andshouldbechanged,try:”opensslpasswd-1-salt’random-phrase-here”your-password-here'”togeneratenewone8:fencingtoolswerenotfound,andarerequiredtousethe(optional)power\managementfeatures.installcmanorfence-agentstousethemRestartcobblerdandthenrun’cobblersync’toapplychanges.##解决办法:1、修改/etc/cobbler/settings文件中的server参数的值为提供cobbler服务的主机相应的IP\地址或主机名,如172.16.10.9;2、修改/etc/cobbler/settings文件中的next_server参数的值为提供PXE服务的主机相应的\IP地址,如172.16.10.9;3、如果当前节点可以访问互联网,执行“cobblerget-loaders”命令即可;否则,需要\安装syslinux程序包,而后复制/usr/share/syslinux/{pxelinux.0,memu.c32}等文件至\/var/lib/cobbler/loaders/目录中;4、执行“chkconfigrsyncon”命令即可;5、注释/etc/debmirror.conf文件中的“@dists=”sid”;”一行;6、注释/etc/debmirror.conf文件中的“@arches=”i386″;”一行;7、执行“opensslpasswd-1-salt$(opensslrand-hex4)”生成密码,并用其替换\/etc/cobbler/settings文件中default_password_crypted参数的值;8、执行“yuminstallcmanfence-agents”命令安装相应的程序包即可;##说明5,6,8步骤不是必需的。接着重启cobblerd,而后执行“cobblersync”同步新的配置至cobbler。结果如下:

千万个不眠的夜里,你一直让我感动,只是因为相信有个人会爱我一生一世。

Cobbler实现自动化安装操作系统

相关文章:

你感兴趣的文章:

标签云: