cobbler --- 安裝配置的簡單介紹

1、安裝 cobbler

1.1、安裝前的準(zhǔn)備
  • 安裝epel源,在centos下,直接執(zhí)行
]# yum install epel-release
  • 安裝 cobbler 所需的配合軟件:DHCP、TFTP、Apache

注:

cobbler 支持管理兩種DHCP,ISC DHCP 和 dnsmasq ,通過以下命令,默認(rèn)安裝的是 ISC DHCP

]# yum install dhcp tftp-server httpd
  • 安裝cobbler
]# yum install cobbler

注1:

實驗機(jī)的配置請參考《VMware --- CentOS6.x 實驗機(jī)的安裝配置》

注2:

實驗機(jī)所使用的操作系統(tǒng)版本為:CentOS release 6.6 (Final)

注3:

實驗機(jī)本機(jī) IP 為:192.168.80.20


2、配置 cobbler

2.1 執(zhí)行 cobbler check
  • 啟動 cobbler 和 http
]# /etc/init.d/cobblerd start
]# /etc/init.d/httpd start
]# chkconfig cobblerd on
]# chkconfig httpd on
  • 開啟 cobbler 的動態(tài)配置
]# cp /etc/cobbler/settings /etc/cobbler/settings.`date +%y%m%d`.bak

]# vim /etc/cobbler/settings
allow_dynamic_settings: 0 --> 1

]# /etc/init.d/cobblerd restart
  • 檢查 cobbler 安裝
]# cobbler check
The following are potential configuration items that you may want to fix:
   
1 : 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 to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
4 : 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.
5 : change 'disable' to 'no' in /etc/xinetd.d/rsync
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : ksvalidator was not found, install pykickstart
8 : 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
9 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
   
Restart cobblerd and then run 'cobbler sync' to apply changes.
  • 解決檢查出來的問題

問題1:

]# cobbler setting report --name=server

解決:

]# cobbler setting edit --name=server --value=192.168.80.20

問題2:

]# cobbler setting report --name=next_server

解決:

]# cobbler setting edit --name=next_server --value=192.168.80.20

問題3:

解決:

]# vim /etc/xinetd.d/tftp
disable = yes --> no

問題4: 下載網(wǎng)絡(luò)引導(dǎo)文件,下載后的引導(dǎo)文件會存放在 /var/lib/cobbler/loaders 目錄下

解決:

]# cobbler get-loaders
task started: 2015-08-19_153812_get_loaders
task started (id=Download Bootloader Content, time=Wed Aug 19 15:38:12 2015)
downloading http://cobbler.github.com/loaders/README to /var/lib/cobbler/loaders/README
downloading http://cobbler.github.com/loaders/COPYING.elilo to /var/lib/cobbler/loaders/COPYING.elilo
downloading http://cobbler.github.com/loaders/COPYING.yaboot to /var/lib/cobbler/loaders/COPYING.yaboot
downloading http://cobbler.github.com/loaders/COPYING.syslinux to /var/lib/cobbler/loaders/COPYING.syslinux
downloading http://cobbler.github.com/loaders/elilo-3.8-ia64.efi to /var/lib/cobbler/loaders/elilo-ia64.efi
downloading http://cobbler.github.com/loaders/yaboot-1.3.17 to /var/lib/cobbler/loaders/yaboot
downloading http://cobbler.github.com/loaders/pxelinux.0-3.86 to /var/lib/cobbler/loaders/pxelinux.0
downloading http://cobbler.github.com/loaders/menu.c32-3.86 to /var/lib/cobbler/loaders/menu.c32
downloading http://cobbler.github.com/loaders/grub-0.97-x86.efi to /var/lib/cobbler/loaders/grub-x86.efi
downloading http://cobbler.github.com/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
*** TASK COMPLETE ***

問題5:

解決:

]# vim /etc/xinetd.d/rsync
disable = yes --> no

問題6: 安裝 debmirror(如果沒有 Debian 主機(jī),該項為可選項)

解決:

]# yum install debmirror

# 并且在 /etc/debmirror.conf 中注釋這兩個項目:'dists'、'arches'
]# vim /etc/debmirror.conf 
#@dists="sid";
#@arches="i386";

問題7: 安裝 pykickstart

解決:

]# yum install pykickstart

問題8: 生成新的root密碼,并在 /etc/cobbler/settings 文件中對 default_password_crypted 的值進(jìn)行替換

解決:

# syntax:
openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'

]# openssl passwd -1 -salt 'yue' 'Emc20160'
$1$yue$wzTcBFUcp8u6BayioJRUy0
]# cobbler setting edit --name=default_password_crypted --value='$1$yue$wzTcBFUcp8u6BayioJRUy0'

問題9: 安裝 cman 或 fence-agents,我這邊選擇安裝 cman

解決:

]# yum install cman
  • 設(shè)置 cobbler 管理 dhcp

當(dāng)通過 cobbler 來管理 DHCP 時,使用的 DHCP 配置文件為 /etc/cobbler/dhcp.template

]# cobbler setting edit --name=manage_dhcp --value=1
  • 配置 /etc/cobbler/dhcp.template
]# vim /etc/cobbler/dhcp.template
# 根據(jù)規(guī)劃,修改如下:
......
subnet 192.168.80.0 netmask 255.255.255.0 {
     option routers             192.168.80.2;
     option domain-name-servers 192.168.80.2;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        192.168.80.21 192.168.80.30;
......
  • 設(shè)置 pxe_just_once

選項 pxe_just_once 預(yù)防將機(jī)器中的安裝循環(huán)配置為始終從網(wǎng)絡(luò)引導(dǎo)。激活此選項時,機(jī)器告訴 Cobbler 安裝已完成。Cobbler 將系統(tǒng)對象的 netboot 標(biāo)志更改為 false,這會強(qiáng)制機(jī)器從本地磁盤引導(dǎo)。

]# cobbler setting edit --name=pxe_just_once --value=1
  • 重啟cobbler、xinetd
]# /etc/init.d/cobblerd restart
]# /etc/init.d/xinetd restart
  • 再次檢查 cobbler
]# cobbler sync
]# cobbler check
No configuration problems found.  All systems go.

至此,已完成 cobbler 的安裝、配置

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 228,983評論 6 537
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 98,772評論 3 422
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 176,947評論 0 381
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經(jīng)常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,201評論 1 315
  • 正文 為了忘掉前任,我火速辦了婚禮,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 71,960評論 6 410
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 55,350評論 1 324
  • 那天,我揣著相機(jī)與錄音,去河邊找鬼。 笑死,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,406評論 3 444
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 42,549評論 0 289
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 49,104評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 40,914評論 3 356
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 43,089評論 1 371
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 38,647評論 5 362
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 44,340評論 3 347
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 34,753評論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,007評論 1 289
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機(jī)就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 51,834評論 3 395
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 48,106評論 2 375

推薦閱讀更多精彩內(nèi)容