当前位置:文档之家› Cobbler安装配置手册

Cobbler安装配置手册

目录1.Cobbler的安装 (2)2.Cobbler的配置 (2)3.配置Cobbler_web (4)4.导入光盘及建立Profile (5)5.配置Kickstart的启动文件 (5)6.安装系统 (7)1.Cobbler的安装1.下载rpmforge的repository RPM# wget /rpmforge-release/rpmforge-release-0.5.2-\2.el6.rf.i686.rpm2.安装rpmforge-release-0.5.2-2.el6.rf.i686.rpm# rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm3.安装semanage命令的包policycoreutils-python# yum -y install policycoreutils-python4.安装pykickstart#yum -y install pykickstart5.执行cobbler check# cobbler check6.如果报下面错误,则先择selinux关闭# cobbler checkhttpd does not appear to be running and proxying cobbler# setenforce 07.再执行cobbler check,并按照提示下的项进行配置# cobbler check2.Cobbler的配置执行cobbler check,并按照提示下的项进行配置,通常的配置项如下:# cobbler check1.启动cobbler,httpd,xinetd,dhcpd服务# service httpd start# service xinetd start# service cobblerd start2.执行cobbler check并按照提示下的项进行配置,通常的配置项如下从第3项开始:# cobbler check1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost,or kickstarting features will not work. This should 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 tosomething other than 127.0.0.1, and should match the IP of the boot server on the PXE network.3 : Must enable a selinux boolean to enable vital web services components, run: setsebool-P httpd_can_network_connect true4 : you need to set some SELinux content rules to ensure cobbler serves content correctlyin your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t "/var/lib/tftpboot/.*" && /usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler"/images/.*5 : you need to set some SELinux rules if you want to use cobbler-web (an optionalpackage), run the following: /usr/sbin/semanage fcontext -a -t httpd_sys_content_rw_t "/var/lib/cobbler/webui_sessions/.*"6 : 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, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.7 : change 'disable' to 'no' in /etc/xinetd.d/rsync8 : since iptables may be running, ensure 69, 80, and 25151 are unblocked9 : debmirror package is not installed, it will be required to manage debian deployments and repositories10 : ksvalidator was not found, install pykickstart11 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new oneRestart cobblerd and then run 'cobbler sync' to apply changes.3.编辑/etc/cobbler/settings,修改如下项:server: 172.16.3.1此处IP改为cobbler服务器的本机IPnext_server: 172.16.3.1此处IP改为cobbler服务器的本机IPmanage_dhcp: 1此处原本为0,修改为1打开DHCP服务4.编辑/etc/xinetd.d/tftp,修改disable = no 此处原本为“yes”,修改为“no”5.编辑/etc/xinetd.d/rsync,修改disable = no 此处原本为“yes”,修改为“no”6.编辑/etc/cobbler/dhcp.template,修改subnet部分如下:配置两个subnet 172.16.3.0/24和172.16.1.0/24,如有其它subnet的主机需要使用cobbler安装OS,则增加此subnet。

subnet 172.16.3.0 netmask 255.255.255.0 {option routers 172.16.3.254;option domain-name-servers 172.16.3.1;option subnet-mask 255.255.255.0;range dynamic-bootp 172.16.3.100 172.16.3.120;filename "/pxelinux.0";default-lease-time 21600;max-lease-time 43200;next-server 172.16.3.1;}subnet 172.16.1.0 netmask 255.255.255.0 {option routers 172.16.1.254;option domain-name-servers 172.16.3.1;option subnet-mask 255.255.255.0;range dynamic-bootp 172.16.1.100 172.16.1.120;filename "/pxelinux.0";default-lease-time 21600;max-lease-time 43200;next-server 172.16.3.1;}7.把上面的配置复制到/etc/dhcp/dhcpd.conf中。

8.编辑/etc/sysconfig/iptables,添加下面几行以打开端口80,69和25151-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 69 -j ACCEPT-A INPUT -m state --state NEW -m udp -p udp --dport 69 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 25151 -j ACCEPT然后再重启iptables# service iptables restart9.如果selinux开启,则根据cobbler check的提示,执行相应的命令以开启selinux相关权限。

相关主题