cobbler2.4+CentOS6.4 安裝配置node
一:安裝包linux
#rpm -Uvh http://mirrors.hustunique.com/epel/6/x86_64/epel-release-6-8.noarch.rpmweb
#yum install cobbler cobbler-webvim
#yum install dhcp httpd服務器
#chkconfig cobblerd on網絡
#chkconfig httpd onsession
#cobbler checkdom
錯誤檢測:看附錄ide
二:配置環境ui
# vi /etc/cobbler/settings /修改cobbler配置文件
server: '192.168.200.1' #cobbler服務器地址作修改
next_server: '192.168.200.1' #作修改
manage_dhcp: 1 #cobbler接管dhcp
#vi /etc/cobbler/dhcp.template /cobbler-dhcp設置dhcpd的routers-ip和range段
ddns-update-style interim;
allow booting;
allow bootp;
ignore client-updates;
set vendorclass = option vendor-class-identifier;
option pxe-system-type code 93 = unsigned integer 16;
subnet 192.168.200.0 netmask 255.255.255.0 {
option routers 192.168.200.254;
option domain-name-servers 192.168.200.254;
option subnet-mask 255.255.255.0;
range dynamic-bootp 192.168.200.50 192.168.200.70;
default-lease-time 21600;
max-lease-time 43200;
next-server $next_server;
三:配置web環境
#vi /etc/cobbler/modules.conf
module = authn_configfile /修改認證方式爲密碼文件類型
#htdigest /etc/cobbler/users.digest "Cobbler" tech /添加tech用戶,提示輸入2遍密碼確認
# cobbler sync /輸出*** TASK COMPLETE *** 表示配置無錯誤
# /etc/init.d/httpd restart
# /etc/init.d/cobblerd restart
訪問web頁面 https://192.168.200.1/cobbler_web /使用剛纔建立的用戶登陸
web頁面管理
1:添加DVD源,
點擊Importer DVD (先掛載鏡像ISO),而後再Importer,點擊run
2:Events觀察日誌
Tue Nov 19 08:11:54 2013 Sync complete log /complete表示完成:
3:Distros裏面查看源
CentOS6.4-x86_64
4:Profiles裏添加部署工程
選擇Distros和ks文件位置,而後保存
5:客戶端從網絡啓動後選擇對應的工程文件開始自動部署
付:錯誤排除
# cobbler check
The following are potential configuration items that you may want to fix:
1 : Must enable a selinux boolean to enable vital web services components, run: setsebool -P httpd_can_network_connect true
2 : you need to set some SELinux content rules to ensure cobbler serves content correctly in your SELinux environment, run the following: /usr/sbin/semanage fcontext -a -t public_content_t "/tftpboot/.*" && /usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler"/images/.*
3 : you need to set some SELinux rules if you want to use cobbler-web (an optional package), run the following: /usr/sbin/semanage fcontext -a -t httpd_sys_content_rw_t "/var/lib/cobbler/webui_sessions/.*"
解決:關閉selinux
# vim /etc/sysconfig/selinux
SELINUX=disabled
4 : change 'disable' to 'no' in /etc/xinetd.d/tftp
解決:編輯/etc/xinetd.d/tftp文件,將文件中的disable字段的配置由yes改成no
5 : change 'disable' to 'no' in /etc/xinetd.d/rsync
解決:編輯/etc/xinetd.d/rsync文件,將文件中的disable字段的配置由yes改成no
6 : since iptables may be running, ensure 69, 80, and 25151 are unblocked
解決:在iptables中將69,80,25151端口打開。若是僅僅只是在內部環境中使用,建議直接將防火牆關掉
7 : debmirror package is not installed, it will be required to manage debian deployments and repositories
解決:yum install debmirror
或:rpm -Uvh ftp://rpmfind.net/linux/epel/5/i386/debmirror-20090807-1.el5.noarch.rpm --nodeps --force
8 : ksvalidator was not found, install pykickstart
解決:yum install pykickstart
9 : 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 one
解決: 修改默認密碼就OK了,而後把密碼寫入到/etc/cobbler/settings中
# openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'
10 : comment 'dists' on /etc/debmirror.conf for proper debian support
11 : comment 'arches' on /etc/debmirror.conf for proper debian support
解決:註釋/etc/debmirror.conf 下面兩行
#@dists="sid";
@sections="main,main/debian-installer,contrib,non-free";
#@arches="i386";
12:fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
解決: yum install cman
修復完成,再用 cobbler check 檢查一下,確認沒問題後用 cobbler sync 作同步操做:
# cobbler check
No configuration problems found. All systems go. 返回這個結果就OK了