cobbler 安装配置
系统:CentOS5.× 32bit
一:准备包
添加rpmforge第三方源,包含cobbler安装包。
wget
32bit 适用:RHEL5 and CentOS-5 x86 32bit
wget
64bit 适用:RHEL5 and CentOS-5 x86 64bit
yum list 应该就有rpmforge的源了。
[root@SVN01 ~]# yum list |grep cobbler
cobbler.noarch 0.5.0-1.el5.rf installed cobbler-web.noarch 2.0.11-2.el5 installed
二:安装包
[root@SVN01 ~]#yum -y install cobbler dhcp httpd xinetd tftp-server
#修改cobbler配置文件
[root@SVN01 ~]#vi /var/lib/cobbler/settings
红色为修改项
---
bootloaders: ia64: /var/lib/cobbler/elilo-3.6-ia64.efi standard: /usr/lib/syslinux/pxelinux.0 default_kickstart: /etc/cobbler/default.ks dhcpd_bin: /usr/sbin/dhcpd dhcpd_conf: /etc/dhcpd.conf dnsmasq_bin: /usr/sbin/dnsmasq dnsmasq_conf: /etc/dnsmasq.conf httpd_bin: /usr/sbin/httpd kernel_options: ksdevice: eth0 lang: ' ' syslog: '192.168.40.16:25150' text: ~ koan_path: '' manage_dhcp: 1 使cobbler接管dhcpd manage_dhcp_mode: isc minimize_syncs: 1 next_server: '192.168.40.16' 修改为服务器地址 server: '192.168.40.16' syslog_port: 25150 tftpboot: /tftpboot tftpd_bin: /usr/sbin/in.tftpd tftpd_conf: /etc/xinetd.d/tftp webdir: /var/www/cobbler xmlrpc_port: 25151 yum_core_mirror_from_server: 0
三:修改Fftp配置文件
[root@SVN01 ~]#vi /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot disable = no 修改参数YES-->NO per_source = 11 cps = 100 2 flags = IPv4 }
cobbler自检,如果没有错误则会有如下提示,否则按照提示修改相关配置。
[root@SVN01 ~]#cobbler check
Manual review and editing of /var/lib/cobbler/settings is recommended to tailor cobbler to your particular configuration.
Good luck.
四:修改DHCP配置文件
[root@SVN01 ~]#cp –a /etc/cobbler/dhcp.template /etc/dhcpd.conf
# ******************************************************************
# Cobbler managed dhcpd.conf file # generated from cobbler dhcp.conf template (Tue Jul 26 16:58:54 2011) # ******************************************************************ddns-update-style interim;
allow booting;
allow bootp;ignore client-updates;
set vendorclass = option vendor-class-identifier;subnet 192.168.40.0 netmask 255.255.255.0 { /子网范围
option routers 192.168.40.16; /网关地址 option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.40.75 192.168.40.80; /池大小 filename "/pxelinux.0"; /启动文件 default-lease-time 21600; max-lease-time 43200; next-server 192.168.40.16; /下一跳地址,TFTP服务器地址 }#
五:启动相关服务然后设置自启动:
[root@SVN01 ~]#chkconfig --level 35 httpd xinetd dhcpd cobblerd on
准备系统ISO光盘
[root@SVN01 ~]#mount -o loop /ISO/CentOS-6.0-i386.iso /mnt/iso/
[root@SVN01 ~]#cobbler import --mirror=/mnt/iso/ --name=CentOS6.0-i386
[root@SVN01 ~]#cobbler distro list
distro CentOS6.0-i386
profile CentOS6.0-i386
[root@SVN01 ~]#cobbler sync
sync distro: CentOS6.0-i386
sync profile: CentOS6.0-i386 Shutting down dhcpd: [ OK ] Starting dhcpd: [ OK ]
六:准备KS文件替换至kickstarts目录中
[root@SVN01 ~]#cp -a ~/ks.cfg /var/www/cobbler/kickstarts/CentOS6.0-i386/ks.cfg
七:客户端测试
cobbler 能否做到多个列表比如先选择安装源,然后选择KS文件?