快速业务通道

cobbler 批量安装linux

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-02

一、安装环境centos 5.4关掉iptables 关掉 selinux selinux 导致tftp的目录无法访问 pxe停止在引导界面
二、cobbler使用目录及文件cobbler相关配置文件 /etc/cobblercobbler数据存储目录 /var/www/cobblerdhcp配置文件 /etc/dhcpd.confdhcp租期缓存文件 /var/lib/dhcpd/dhcpd.leasespxe配置文件 /tftpboot/pxelinux.cfg/default
三、安装cobbler# rpm -ivh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm# rpm -ivh http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm# yum -y install tftp-server httpd dhcp yum-utils# yum -y install cobbler# yum -y install cman yum-utils 编译安装 make && make install

四、修改配置文件
1.修改cobbler配置文件# vi /etc/cobbler/settings[code]server: ''192.168.1.3'' #cobbler服务器地址next_server: ''192.168.1.3'' manage_dhcp: 1[/code]
2.更改tftp启动方式# vi /etc/xinetd.d/tftp[code]disable = no #默认开启tftp[/code]
3.编辑dhcp配置模板# vi /etc/cobbler/dhcp.template 改为相应的网段和ipsubnet 192.168.2.0 netmask 255.255.255.0 { option routers 192.168.2.5; option domain-name-servers 192.168.2.1; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.2.100 192.168.2.254; filename "/pxelinux.0"; default-lease-time 21600; max-lease-time 43200; next-server $next_server;}

五、导入CentOS 光盘映像文件# mkdir /home/CentOS# mount /home/src/CentOS-5.2-i386-bin-DVD.iso /home/CentOS/ -o loop#cobbler import --path=/mnt/dvd --name=CentOS5.4_x86_64# cobbler sync 应用配置模板


六、cobbler check 根据提示解决问题 例如:#2: Must enable selinux boolean to enable Apache and web services components, run: setsebool -P httpd_can_network_connect trueNice to see that it has good instructions for selinux#3: you need to set some SELinux content rules to ensure cobbler works correctly in 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/.*"Detailed command to enable http server to reed content from /var/www/cobbler and have tfpboot find its files#4: service cobblerd is not runningObviously this isn''t running because we did not start it yet#5: change ''disable'' to ''no'' in /etc/xinetd.d/tftp#6: service httpd is not running#7: since iptables may be running, ensure 69 (dhcp), 80(http), 25150(cobbler api), and 25151(cobbler api R/W) are unblocked 关闭防火墙#8: reposync is not installed, need for cobbler reposync, install/upgrade yum-utils?Easy to solve with: yum install yum-utils#9: yumdownloader is not installed, needed for cobbler repo add with --rpm-list parameter, install/upgrade yum-utils? 安装yum-utils#10: fencing tools were not found, and are required to use the (optional) power management features. install cman to use them 安装cman七、启动cobbler服务service dhcpd startservice httpd startservice xinetd restartservic

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号