Centos6上安装cobbler及cobbler常见参数详解

前端之家收集整理的这篇文章主要介绍了Centos6上安装cobbler及cobbler常见参数详解前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

前言

Cobbler是一个自动化和简化系统安装的工具,通过使用网络引导来控制和启动安装。Cobbler的特性包括存储库镜像、Kickstart模板和连接电源管理系统。使用Cobbler之前需要先了解下PXE和Kickstart的基本原理,文章包含了Cobbler工作原理和Cobbler部署实践两部分内容,交叉关联性的内容还是蛮多的,遇到报错也不要怕,都会一步一步解决的。
使用Cobbler轻松设置和管理网络安装环境
Cobbler工作原理
Cobbler由Python语言开发,是对PXE和Kickstart以及DHCP的封装。融合很多特性,提供了CLI和Web的管理形式。更加方便的实行网络安装。同时,Cobbler也提供了API接口,使用其它语言也很容易做扩展。它不紧可以安装物理机,同时也支持kvm、xen虚拟化、Guest OS的安装。更多的是它还能结合Puppet等集中化管理软件,实现自动化的管理。
Cobbler 支持众多的发行版:Red Hat、Fedora、CentOS、Debian、Ubuntu 和 SuSE。当添加一个操作系统(通常通过使用 ISO 文件)时,Cobbler 知道如何解压缩合适的文件并调整网络服务,以正确引导机器。Cobbler 使用命令行方式管理,也提供了基于Web的图形化配置管理工具(cobbler-web)。通过配置cobbler自动部署DHCP、TFTP、HTTP,在安装过程中加载kiskstart无人值守安装应答文件实现无人值守。从客户端使用PXE引导启动安装。

Server端

第一步,启动Cobbler服务
第二步,进行Cobbler错误检查,执行cobbler check命令
第三步,进行配置同步,执行cobbler sync命令
第四步,复制相关启动文件文件到TFTP目录中
第五步,启动DHCP服务,提供地址分配
第六步,DHCP服务分配IP地址
第七步,TFTP传输启动文件
第八步,Server端接收安装信息
第九步,Server端发送ISO镜像与Kickstart文件


Client端

第一步,客户端以PXE模式启动
第二步,客户端获取IP地址
第三步,通过TFTP服务器获取启动文件
第四步,进入Cobbler安装选择界面
第五步,客户端确定加载信息
第六步,根据配置信息准备安装系统
第七步,加载Kickstart文件
第八步,传输系统安装的其它文件
第九步,进行安装系统

Cobbler部署实践

设置YUM源
cd/etc/yum.repo.d/
viepel.repo

[epel]
name=ExtraPackagesforEnterpriseLinux6-$basearch
baseurl=
#mirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-6&arch=$basearchfailovermethod=priority
enabled=1gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6[epel-debuginfo]
name=ExtraPackagesforEnterpriseLinux6-$basearch-Debug
baseurl=
#mirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-debug-6&arch=$basearchfailovermethod=priority
enabled=0gpgkey=
[epel-source]
name=ExtraPackagesforEnterpriseLinux6-$basearch-Source
baseurl=
#mirrorlist=https://mirrors.fedoraproject.org/Metalink?repo=epel-source-6&arch=$basearchfailovermethod=priority
enabled=0gpgkey=
#导入GPGkeysudorpm--import
#修改repo文件添加CentOS6.X的YUM源cd/etc/yum.repos.d/
cprhel-source.reporhel-source.repo.bak
virhel-source.repo

[base]
name=CentOS-$releasever-Base
baseurl=http://centos.ustc.edu.cn/centos/6/os/x86_64/
gpgcheck=1gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6[updates]
name=CentOS-$releasever-Updates
baseurl=http://centos.ustc.edu.cn/centos/6/os/x86_64/
gpgcheck=1gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6[extras]
name=CentOS-$releasever-Extras
baseurl=http://centos.ustc.edu.cn/centos/6/os/x86_64/
gpgcheck=1gpgkey=http://mirrors.ustc.edu.cn/centos/RPM-GPG-KEY-CentOS-6[centosplus]
name=CentOS-$releasever-Plus
baseurl=http://centos.ustc.edu.cn/centos/6/os/x86_64/
gpgcheck=1@H_301_79@ 
清除缓存查看是否生效
yumcleanall
yummakecache
yumrepolist@H_301_79@ 
直接cobbler关联依赖包
yuminstallcobbler
cobbler-web
httpd
rsync
tftp-server
xinetd
dhcp
python-ctypes
debmirror
pykickstart
cman
fence-agents
dnsmasq

#使用yum-plugin-downloadonly插件yuminstall-yyum-plugin-downloadonly
yuminstall
--downloadonly
--downloaddir=/tmp/cobbler
cobbler
cobbler-web
httpdrsync
tftp-server
xinetd
dhcp
python-ctypes
debmirror
pykickstart
cman
fence-agents
dnsmasq@H_301_79@ 
必要服务

(1)cobbler (cobbler的核心)
(2)httpd (提供cobbler的web界面)
(3)dhcpd (为自动安装系统分配IP地址)
(4)epel-release (为之提供yum源)
(5)rsync (cobbler需要同步信息)
(6)cobbler-web (cobbler的一个web插件
(7)xinetd (为rsync和tftp的守护进程)
(8)tftp (传送安装的一些文件的类似ftp)

检查cobbler配置,常见错误如下
cobblercheck1:The'server'fieldin/etc/cobbler/settingsmustbesettosomethingother
thanlocalhost,orkickstartingfeatureswillnotwork.Thisshouldbea
resolvablehostnameorIPforthebootserverasreachablebyallmachines
thatwilluseit.2:ForPXEtobefunctional,the'next_server'fieldin/etc/cobbler/settings
mustbesettosomethingotherthan127.0.0.1,andshouldmatchtheIPof
thebootserveronthePXEnetwork.3:change'disable'to'no'in/etc/xinetd.d/tftp4:somenetworkboot-loadersaremissingfrom/var/lib/cobbler/loaders,you
mayrun'cobblerget-loaders'todownloadthem,or,ifyouonlywantto
handlex86/x86_64netbooting,youmayensurethatyouhaveinstalleda
*recent*versionofthesyslinuxpackageinstalledandcanignorethis
messageentirely.Filesinthisdirectory,shouldyouwanttosupportall
architectures,shouldincludepxelinux.0,menu.c32,elilo.efi,andyaboot.
The'cobblerget-loaders'commandistheeasiestwaytoresolvethese
requirements.5:change'disable'to'no'in/etc/xinetd.d/rsync6:file/etc/xinetd.d/rsyncdoesnotexist7:debmirrorpackageisnotinstalled,itwillberequiredtomanagedebian
deploymentsandrepositories8:ksvalidatorwasnotfound,installpykickstart9:Thedefaultpasswordusedbythesampletemplatesfornewlyinstalled
machines(default_password_cryptedin/etc/cobbler/settings)isstillsetto
'cobbler'andshouldbechanged,try:"opensslpasswd-1-salt'random-
phrase-here''your-password-here'"togeneratenewone10:fencingtoolswerenotfound,andarerequiredtousethe(optional)
powermanagementfeatures.installcmanorfence-agentstousethem@H_301_79@ 

1.编辑/etc/cobbler/settings文件,找到 server选项,修改为本机IP即可
2.编辑/etc/cobbler/settings文件,找到 next_server选项,修改为本机IP即可
3.SELinux的设置,如果上面已经关闭了SELinux就不用管了
4.执行 cobbler get-loaders,系统将自动下载loader程序,完成提示4的修复工作。
5.编辑/etc/xinetd.d/tftp文件,将文件中的disable字段的配置由yes改为no
6.编辑/etc/xinetd.d/rsync文件,将文件中的disable字段的配置由yes改为no
7.在iptables中将69,80,25151端口打开。如果仅仅只是在内部环境中使用,建议直接将防火墙关掉
8.提示说debmirror没安装。如果不是安装 debian之类的系统,此提示可以忽略
9.修改cobbler用户的默认密码,可以使用如下命令生成密码,并使用生成后的密码替换/etc/cobbler/settings中的密码。生成密码命令:openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'其中“random-phrase-here”为任意字符
10.安装cman或者fence-agents

关闭selinux/iptables

sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
setenforce 0
chkconfig iptables off
service iptables stop

设置tftp服务和rsync服务

sed -i '/disable/c\tdisable\t\t\t= no' /etc/xinetd.d/tftp
sed -i -e 's/\=\ yes/\=\ no/g' /etc/xinetd.d/rsync

设置DHCP server的IP

sed -i 's/next_server: 127.0.0.1/next_server: 172.28.70.245/g' /etc/cobbler/settings

设置cobbler的IP

sed -i 's/server: 127.0.0.1/server: 172.28.70.245/g' /etc/cobbler/settings

设置Cobbler管理rsync

sed -i 's/manage_rsync: 0/manage_rsync: 1/g' /etc/cobbler/settings

设置Cobbler管理DHCP

sed -i 's/manage_dhcp: 0/manage_dhcp: 1/g' /etc/cobbler/settings

设置Cobbler一次安装开关(可选)

sed -i 's/pxe_just_once: 0/pxe_just_once: 1/g' /etc/cobbler/settings

设置Cobbler管理DNS(可选)

sed -i 's/manage_dns: 0/manage_dns: 1/g' /etc/cobbler/settings

开启动态更新(可选)

sed -i 's/allow_dynamic_settings: 0/allow_dynamic_settings: 1/g' /etc/cobbler/settings

设置debmirror

sed -i -e 's/@dists=/#@dists=/g' /etc/debmirror.conf
sed -i -e 's/@arches=/#@arches=/g' /etc/debmirror.conf

编辑dnsmasq.template中dhcp-range部分

#vi/etc/cobbler/dnsmasq.templatevi/etc/dnsmasq.conf#Cobblergeneratedconfigurationfilefordnsmasq#$date##resolve.conf..?#no-poll#enable-dbusread-ethers
addn-hosts=/var/lib/cobbler/cobbler_hosts

dhcp-range=172.28.70.246,172.28.70.250dhcp-option=3,$next_serverdhcp-lease-max=1000dhcp-authoritative
dhcp-boot=pxelinux.0dhcp-boot=net:normalarch,pxelinux.0dhcp-boot=net:ia64,$elilo
#重启dnsmasq/etc/init.d/dnsmasqrestart#编辑dhcp.templatecp/etc/cobbler/dhcp.template/etc/cobbler/dhcp.template.bak
vi/etc/cobbler/dhcp.template
#******************************************************************
#Cobblermanageddhcpd.conffile#
#generatedfromcobblerdhcp.conftemplate($date)
#DoNOTmakechangesto/etc/dhcpd.conf.Instead,makeyourchanges
#in/etc/cobbler/dhcp.template,as/etc/dhcpd.confwillbe
#overwritten.
#******************************************************************
#ddns-update-styleinterim;

allowbooting;
allowbootp;

ignoreclient-updates;setvendorclass=optionvendor-class-identifier;

optionpxe-system-typecode93=unsignedinteger16;

subnet172.28.70.0netmask255.255.255.0{
optionrouters172.28.70.254;
optiondomain-name-servers172.28.70.254;
optionsubnet-mask255.255.255.0;
rangedynamic-bootp172.28.70.246172.28.70.250;
default-lease-time21600;
max-lease-time43200;
next-server$next_server;
class"pxeclients"{
matchifsubstring(optionvendor-class-identifier,9)="PXEClient";
ifoptionpxe-system-type=00:02{
filename"ia64/elilo.efi";
}elseifoptionpxe-system-type=00:06{
filename"grub/grub-x86.efi";
}elseifoptionpxe-system-type=00:07{
filename"grub/grub-x86_64.efi";
}else{
filename"pxelinux.0";
}
}

}#fordhcp_tagin$dhcp_tags.keys():
##groupcouldbesubnetifyourdhcptagslineupwithyoursubnets
##orreallyanyvaliddhcpd.confconstruct...ifyouonlyusethe
##defaultdhcptagincobbler,thegroupblockcanbedeletedfora
##flatconfiguration#groupforCobblerDHCPtag:$dhcp_taggroup{
#formacin$dhcp_tags[$dhcp_tag].keys():
#setiface=$dhcp_tags[$dhcp_tag][$mac]
host$iface.name{
hardwareethernet$mac;#if$iface.ip_address:
fixed-address$iface.ip_address;#endif
#if$iface.hostname:
optionhost-name"$iface.hostname";#endif
#if$iface.netmask:
optionsubnet-mask$iface.netmask;#endif
#if$iface.gateway:
optionrouters$iface.gateway;#endif
#if$iface.enable_gpxe:
ifexistsuser-classandoptionuser-class="gPXE"{
filename"http://$cobbler_server/cblr/svc/op/gpxe/system/$iface.owner";
}elseifexistsuser-classandoptionuser-class="iPXE"{
filename"http://$cobbler_server/cblr/svc/op/gpxe/system/$iface.owner";
}else{
filename"undionly.kpxe";
}#else
filename"$iface.filename";#endif
##Cobblerdefaultsto$next_server,butsomeusers
##mayliketouse$iface.system.serverforproxiedsetups
next-server$next_server;##next-server$iface.next_server;
}#endfor}#endfor#将dns和dhcp的管理引擎都配置为dnsmasq,
修改/etc/cobbler/modules.confvi/etc/cobbler/modules.conf

[authentication]
module=authn_configfile
[dns]
module=manage_dnsmasq
[dhcp]
module=manage_dnsmasq#修改httpd配置并启动vi/etc/httpd/conf/httpd.conf

ServerName127.0.0.1:80/etc/init.d/httpdrestart@H_301_79@ 

设置目标系统root密码,这个设置只对CentOS/RHEL有效

PASSWORD="echo "admin123" | openssl passwd -1 -salt 'root' �stdin"
sed -i s@"^default_password_crypted.*$"@"default_password_crypted: \"$PASSWORD\""@g /etc/cobbler/settings


default_password_crypted: "$1$cobbler$k/5ITeQUOffuOujzEvhjY."


下载启动菜单,启动报错请尝试service cobblerd restart

cobblerget-loaders

cobbler@root#cobblerget-loaderstaskstarted:2016-04-11_092911_get_loaders
taskstarted(id=DownloadBootloaderContent,time=MonApr1109:29:112016)
downloadinghttp://cobbler.github.io/loaders/READMEto/var/lib/cobbler/loaders/README
downloadinghttp://cobbler.github.io/loaders/COPYING.eliloto/var/lib/cobbler/loaders/COPYING.elilo
downloadinghttp://cobbler.github.io/loaders/COPYING.yabootto/var/lib/cobbler/loaders/COPYING.yaboot
downloadinghttp://cobbler.github.io/loaders/COPYING.syslinuxto/var/lib/cobbler/loaders/COPYING.syslinux
downloadinghttp://cobbler.github.io/loaders/elilo-3.8-ia64.efito/var/lib/cobbler/loaders/elilo-ia64.efi
downloadinghttp://cobbler.github.io/loaders/yaboot-1.3.17to/var/lib/cobbler/loaders/yaboot
downloadinghttp://cobbler.github.io/loaders/pxelinux.0-3.86to/var/lib/cobbler/loaders/pxelinux.0downloading
http://cobbler.github.io/loaders/menu.c32-3.86to/var/lib/cobbler/loaders/menu.c32
downloadinghttp://cobbler.github.io/loaders/grub-0.97-x86.efito/var/lib/cobbler/loaders/grub-x86.efi
downloadinghttp://cobbler.github.io/loaders/grub-0.97-x86_64.efito/var/lib/cobbler/loaders/grub-x86_64.efi
***TASKCOMPLETE***#重启相关服务并配置自动启动chkconfigcobblerdon
chkconfighttpdon
chkconfigxinetdon
chkconfigdnsmasqon

servicehttpdrestart
servicexinetdrestart
servicednsmasqrestart
servicecobblerdrestart


#检查并同步cobbler配置,如果有如下报错确认文件存在可以忽略cobbler@ZJ/etc/cobbler#cobblercheckThefollowingarepotentialconfigurationitemsthatyoumaywanttofix:1:file/etc/xinetd.d/rsyncdoesnotexist

Restartcobblerdandthenrun'cobblersync'toapplychanges.

cobbler@ZJ/etc/cobbler#cobblersynctaskstarted:2016-04-11_170138_sync
taskstarted(id=Sync,time=MonApr1117:01:382016)
runningpre-synctriggers
cleaningtrees
removing:/var/lib/tftpboot/grub/images
copyingbootloaders
tryinghardlink/var/lib/cobbler/loaders/pxelinux.0->
/var/lib/tftpboot/pxelinux.0tryinghardlink/var/lib/cobbler/loaders/menu.c32->/var/lib/tftpboot/menu.c32
tryinghardlink/var/lib/cobbler/loaders/yaboot->/var/lib/tftpboot/yaboot
tryinghardlink/usr/share/syslinux/memdisk->/var/lib/tftpboot/memdisk
tryinghardlink/var/lib/cobbler/loaders/grub-x86_64.efi->/var/lib/tftpboot/grub/grub-x86_64.efi
tryinghardlink/var/lib/cobbler/loaders/grub-x86.efi->/var/lib/tftpboot/grub/grub-x86.efi
copyingdistrostotftpboot
copyingimages
generatingPXEconfigurationfiles
generatingPXEmenustructure
renderingDHCPfiles
renderingDNSfiles
renderingTFTPDfiles
generating/etc/xinetd.d/tftp
cleaninglinkcaches
renderingRsyncfiles
runningpost-synctriggers
runningpythontriggersfrom/var/lib/cobbler/triggers/sync/post/*
runningpythontriggercobbler.modules.sync_post_restart_services
running:servicednsmasqrestart
receivedonstdout:Shuttingdowndnsmasq:[OK]
Startingdnsmasq:[OK]

receivedonstderr:
runningshelltriggersfrom/var/lib/cobbler/triggers/sync/post/*
runningpythontriggersfrom/var/lib/cobbler/triggers/change/*
runningpythontriggercobbler.modules.scm_track
runningshelltriggersfrom/var/lib/cobbler/triggers/change/*
***TASKCOMPLETE***#开启动态编辑后的效果cobblersettingreport
cobblersettingreport[--name=option]

allow_duplicate_hostnames:0allow_duplicate_ips:0allow_duplicate_macs:0allow_dynamic_settings:1always_write_dhcp_entries:0anamon_enabled:0auth_token_expiration:3600authn_pam_service:loginbind_chroot_path:
bind_master:127.0.0.1build_reporting_email:['root@localhost']
build_reporting_enabled:0build_reporting_ignorelist:['']
build_reporting_sender:
build_reporting_smtp_server:localhost
build_reporting_subject:
build_reporting_to_address:
buildisodir:/var/cache/cobbler/buildiso
cheetah_import_whitelist:['random','re','time']
client_use_https:0client_use_localhost:0cobbler_master:
consoles:/var/consoles
createrepo_flags:-ccache-ssha
default_deployment_method:ssh
default_kickstart:/var/lib/cobbler/kickstarts/default.ks
default_name_servers:[]
default_name_servers_search:[]
default_ownership:['admin']
default_password_crypted:$1$root$JX8M6OcOn.pjk0pHdnG0y0
default_template_type:cheetah
default_virt_bridge:xenbr0
default_virt_disk_driver:raw
default_virt_file_size:5default_virt_ram:512default_virt_type:xenpvenable_gpxe:0enable_menu:1func_auto_setup:0func_master:overlord.example.org
http_port:80isc_set_host_name:0iso_template_dir:/etc/cobbler/iso
kerberos_realm:EXAMPLE.COM
kernel_options:{'ksdevice':'bootif','lang':'','text':'~'}
kernel_options_s390x:{'vnc':'~','ip':False,'RUNKS':1,'ramdisk_size':40000,'ro':'~','root':'/dev/ram0'}
ldap_anonymous_bind:1ldap_base_dn:DC=example,DC=com
ldap_management_default_type:authconfig
ldap_port:389ldap_search_bind_dn:
ldap_search_passwd:
ldap_search_prefix:uid=
ldap_server:ldap.example.com
ldap_tls:1ldap_tls_cacertfile:
ldap_tls_certfile:
ldap_tls_keyfile:
manage_dhcp:1manage_dns:1manage_forward_zones:[]
manage_reverse_zones:[]
manage_rsync:1manage_tftp:1manage_tftpd:1mgmt_classes:[]
mgmt_parameters:{'from_cobbler':1}
next_server:172.28.70.245power_management_default_type:ipmitool
power_template_dir:/etc/cobbler/power
proxy_url_ext:
proxy_url_int:
puppet_auto_setup:0puppet_parameterized_classes:1puppet_server:puppet
puppet_version:2puppetca_path:/usr/bin/puppet
pxe_just_once:1pxe_template_dir:/etc/cobbler/pxe
redhat_management_key:
redhat_management_permissive:0redhat_management_server:xmlrpc.rhn.redhat.com
redhat_management_type:off
register_new_installs:0remove_old_puppet_certs_automatically:0replicate_repo_rsync_options:-avzH
replicate_rsync_options:-avzH
reposync_flags:-l-n-drestart_dhcp:1restart_dns:1restart_xinetd:1run_install_triggers:1scm_track_enabled:0scm_track_mode:git
serializer_pretty_json:0server:172.28.70.245sign_puppet_certs_automatically:0signature_path:/var/lib/cobbler/distro_signatures.json
signature_url:http://cobbler.github.io/signatures/2.6.x/latest.json
snippetsdir:/var/lib/cobbler/snippets
template_remote_kickstarts:0virt_auto_boot:1webdir:/var/www/cobbler
xmlrpc_port:25151yum_distro_priority:1yum_post_install_mirror:1yumdownloader_flags:--resolve#修改seting文件cobbler登陆服务器地址cobblersettingedit--name=server--value=172.28.0.1#ks脚本关闭pxe,这样就不会重复安装cobblersettingedit--name=pxe_just_once--value=1#TFTP服务器IP地址cobblersettingedit--name=next_server--value=172.28.0.1#cobbler管理rsync,dhcp,dnscobblersettingedit--name=manage_rsync--value=1cobblersettingedit--name=manage_dhcp--value=1cobblersettingedit--name=manage_dns--value=1cobbler导入镜像#使用镜像文件mount-oloop/tmp/rhel-server-6.3-x86_64-dvd.iso/mnt/rhel63#使用光盘mount/dev/sr0/mnt/rhel63#执行镜像导入,并关联自定义自动安装配置ks脚本,这个地方我们可以为不同的系统版本指定不同的自动安装ks脚本(这个过程实际比较长,cobbler
会把软件整个复制一份到本地,在这之前,务必确认硬盘空间足够装下镜
像)
cobblerimport--path=/tmp/rhel63--name=rhel63--kickstart=/var/lib/cobbler/kickstarts/rhel63.cfg

taskstarted:2016-04-12_090326_import
taskstarted(id=Mediaimport,time=TueApr1209:03:262016)
Foundacandidatesignature:breed=redhat,version=rhel6
Foundamatchingsignature:breed=redhat,version=rhel6
Addingdistrosfrompath/var/www/cobbler/ks_mirror/rhel63:
creatingnewdistro:rhel63-x86_64
tryingsymlink:/var/www/cobbler/ks_mirror/rhel63->/var/www/cobbler/links/rhel63-x86_64
creatingnewprofile:rhel63-x86_64
associatingrepos
checkingforrsyncrepo(s)
checkingforrhnrepo(s)
checkingforyumrepo(s)
startingdescentinto/var/www/cobbler/ks_mirror/rhel63forrhel63-x86_64
processingrepoat:/var/www/cobbler/ks_mirror/rhel63
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63
lookingfor/var/www/cobbler/ks_mirror/rhel63/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/repodata
processingrepoat:/var/www/cobbler/ks_mirror/rhel63/HighAvailability
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63/HighAvailability
lookingfor/var/www/cobbler/ks_mirror/rhel63/HighAvailability/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/HighAvailability/repodata
processingrepoat:/var/www/cobbler/ks_mirror/rhel63/Server
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63/Server
lookingfor/var/www/cobbler/ks_mirror/rhel63/Server/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/Server/repodata
processingrepoat:/var/www/cobbler/ks_mirror/rhel63/LoadBalancer
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63/LoadBalancer
lookingfor/var/www/cobbler/ks_mirror/rhel63/LoadBalancer/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/LoadBalancer/repodata
processingrepoat:/var/www/cobbler/ks_mirror/rhel63/ScalableFileSystem
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63/ScalableFileSystem
lookingfor/var/www/cobbler/ks_mirror/rhel63/ScalableFileSystem/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/ScalableFileSystem/repodata
processingrepoat:/var/www/cobbler/ks_mirror/rhel63/ResilientStorage
needtoprocessrepo/comps:/var/www/cobbler/ks_mirror/rhel63/ResilientStorage
lookingfor/var/www/cobbler/ks_mirror/rhel63/ResilientStorage/repodata/*comps*.xml
Keepingrepodataas-is:/var/www/cobbler/ks_mirror/rhel63/ResilientStorage/repodata
***TASKCOMPLETE***
#查看cobbler导入结果cobblerdistrolistcobblerreport
#验证ks有效性,剩下的就是PXE引导测试了cobblervalidateks
cobbler-web#设置Web登录,cobbler2.6以上版本已经无需修改sed-i's/module=authn_denyall/module=authn_configfile/g'/etc/cobbler/modules.conf
#设置CobblerWeb登录用户登录密码htdigest/etc/cobbler/users.digest"Cobbler"cobbler
ChangingpasswordforusercobblerinrealmCobbler
Newpassword:cobbler
Re-typenewpassword:cobbler#cobbler_web登录地址,推荐使用命令行管理http://{IP}/cobbler_web
Cobbler相关选项说明#Cobbler常用命令详解cobblercheck
#检查cobbler配置cobblersync
#同步配置到dhcp/pxe和数据目录cobblerlist
#列出所有的cobbler元素cobblerimport
#导入安装的系统镜像cobblerreport
#列出各元素的详细信息cobblerdistro
#查看导入的发行版系统信息cobblerprofile
#查看配置信息cobblersystem#查看添加的系统信息cobblerreposync
#同步yum仓库到本地#导入镜像文件命令:
cobblerimport--path=镜像路径--name=安装引导名--arch=32位或64位
参数:
path是镜像所挂载的目录
name是导入到cobbler里面显示的名字
arch是32位系统还是64位系统
#导入kickstart文件命令:cobblerprofileadd--name=list名--distro=镜像--kickstart=路径
参数:
name是表示添加的ks的名字,用cobblerreport可以看到这个名字
distro是用哪个镜像,list的distros里面选择一个,需要版本相对应
kickstart是具体的ks文件路径#同步DHCP、HTTPD命令:cobblersync
注,每次修改完dhcp.template之类的配置文件需要执行一次使其生效。
#查看Cobbler列表命令:cobblerlist
注,列出Cobbler所有的元素。
#删除相关列表命令:cobblerdistro/profileremove--name=要删除的引导文件删除指定distro,也就是镜像
删除指定的profile文件,也就是ks
#Cobbler安装后目录说明cobbler配置文件目录/etc/cobbler:
/etc/cobbler/settings#cobbler主配置文件/etc/cobbler/iso/
#iso模板配置文件/etc/cobbler/pxe
#pxe模板文件/etc/cobbler/power
#电源的配置文件/etc/cobbler/users.conf
#Web服务授权配置文件/etc/cobbler/users.digest
#用于web访问的用户名密码配置文件/etc/cobbler/dhcp.template
#DHCP服务的配置模板/etc/cobbler/dnsmasq.template
#DNS服务的配置模板/etc/cobbler/tftpd.template
#tftp服务的配置模板/etc/cobbler/modules.conf
#Cobbler模块配置文件cobbler数据目录/var/lib/cobbler:
/var/lib/cobbler/config/#用于存放distros、systems、profiles等信息配置文件/var/lib/cobbler/triggers
#用于存放用户定义的cobbler命令/var/lib/cobbler/kickstarts/
#默认存放kickstart文件/var/lib/cobbler/loaders
#存放的各种引导程序镜像数据目录/var/www/cobbler:
/var/www/cobbler/ks_mirror/
#导入的发行版系统的所有数据/var/www/cobbler/images/
#导入发行版的Kernel和initrd镜像用于远程网络启动/var/www/cobbler/repo_mirror/
#yum仓库存储目录日志目录/var/log/cobbler/:
/var/log/cobbler/install.log
#客户端的安装系统日志/var/log/cobbler/cobbler.log
#cobbler日志常见问题
#多查看错误日志less/var/log/cobbler/cobbler.log
#为cobbler-web重置用户密码htdigest/etc/cobbler/users.digest"Cobbler"cobbler
#添加新用户htdigest/etc/cobbler/users.digest"Cobbler"usernam
#DHCP多网卡环境可以指定网卡vi/etc/sysconfig/dhcpd
#CommandlineoptionshereDHCPDARGS=eth0@H_301_79@ 原文链接:https://www.f2er.com/centos/380042.html

猜你在找的CentOS相关文章