cobbler基礎安裝

epel源安裝
rpm -ivh epel-release-6-8.noarch.rpm
yum -y install cobbler httpd rsync tftp-server xinetd dhcp cobbler-web koan pykickstart* fence-agents* debmirror syslinux
$$$$$$$$$$$啟動cobbler服務
/etc/init.d/cobblerd start
$$$$$$$$啟動httpd服務
/etc/init.d/httpd start
$$$$$$$$$$檢測
cobbler check
$$$$$$$$$$$$$問題1:
Traceback (most recent call last):
? File "/usr/bin/cobbler", line 36, in <module>
??? sys.exit(app.main())
? File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 657, in main
??? rc = cli.run(sys.argv)
? File "/usr/lib/python2.6/site-packages/cobbler/cli.py", line 270, in run
??? self.token???????? = self.remote.login("", self.shared_secret)
? File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
??? return self.__send(self.__name, args)
? File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
??? verbose=self.__verbose
? File "/usr/lib64/python2.6/xmlrpclib.py", line 1253, in request
??? return self._parse_response(h.getfile(), sock)
? File "/usr/lib64/python2.6/xmlrpclib.py", line 1392, in _parse_response
??? return u.close()
? File "/usr/lib64/python2.6/xmlrpclib.py", line 838, in close
??? raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<class 'cobbler.cexceptions.CX'>:'login failed'">
$$$$$$$$$$$$解決方法:
service cobblerd restart
cobbler get-loaders
$$$$$$$$$$$$$$$$$$$問題2:
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 : 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.?
4 :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 "/tftpboot/.*" && \
????? /usr/sbin/semanage fcontext -a -t public_content_t "/var/www/cobbler/images/.*"
5 : change 'disable' to 'no' in /etc/xinetd.d/rsync
??? change 'disable' to 'no' in /etc/xinetd.d/tftp
6 : comment out 'dists' on /etc/debmirror.conf for proper debian support?
??? comment out 'arches' on /etc/debmirror.conf for proper debian support
7 :since iptables may be running, ensure 69, 80, and 25151 are unblocked
8 : The default pass<a href="http://www.it165.net/edu/ebg/" target="_blank" class="keylink">word</a> used by the sample templates for newly installed machines (default_pass<a href="http://www.it165.net/edu/ebg/" target="_blank" class="keylink">word</a>_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?
Restart cobblerd and then run 'cobbler sync' to apply changes.
9,debmirror package is not installed, it will be required to manage debian deployments and repositories
$$$$$$$$$$$$$$$$$$$$$上面這段信息大意就是:
1,編輯/etc/cobbler/settings文件,找到 server:選項,修改為適當的ip地址,本實例配置ip為:192.168.10.1
2,編輯/etc/cobbler/settings文件,找到 next_server:選項,修改為適當的ip地址,本實例配置ip為:192.168.10.1
4,SELinux的設置。如果上面已經關閉了SELinux就不用管了,SELinux的設置。如果上面已經關閉了SELinux就不用管了
3,執行 cobbler get-loaders,系統將自動下載loader程序,完成提示4的修復工作。
5,編輯/etc/xinetd.d/tftp文件,將文件中的disable字段的配置由yes改為no
?? 編輯/etc/xinetd.d/rsync文件,將文件中的disable字段的配置由yes改為no
6. 在/etc/debmirror.conf文件中注釋dists和arches
7,在iptables中將69,80,25151端口打開。如果僅僅只是在內部環境中使用,建議直接將防火墻關掉
9,提示說debmirror沒安裝。如果不是安裝 debian之類的系統,此提示可以忽略,如果需要安裝,下載地址為:
http://rpmfind.net/linux/rpm2html/search.php?query=debmirror
CentOS 6使用RHEL 5的包就可以。
8,修改cobbler用戶的默認密碼,可以使用如下命令生成密碼,并使用生成后的密碼替換/etc/cobbler/settings??? (default_password_crypted: )中的密碼。生成密碼命令:
openssl passwd -1 -salt '用戶' '密碼'
其中“random-phrase-here”為干擾碼
$$$$$$$$$$$$$$$$$$$$$解決方案:
1.vim /etc/cobbler/settings
????? server: 192.168.1.20
2.vim /etc/cobbler/settings
????? next_server: 192.168.1.20
3.? cobbler get-loaders?
4.vim /etc/sysconfig/selinuc
????? SELINUX=disabled
5. vim /etc/xinetd.d/rsync
????? disable = no
?? vim /etc/xinetd.d/tftp
????? disable = no
?? service xinetd start?
6.vim /etc/debmirror.conf
???? #@dists="sid";
?? ? #@arches="i386";
7./etc/init.d/iptables stop或
? iptables -F
? iptables -X
? /etc/init.d/iptables save
8. openssl passwd -1 -salt 'maishujie' '123456'
???? $1$maishujie$MqApDf9CDu.SNuvbG/ju70
?vim /etc/cobbler/settings?
default_password_crypted: "$1$maishujie$MqApDf9CDu.SNuvbG/ju70"
9.忽略
如遇到其他問題根據錯誤提示解決
/etc/init.d/cobbler restart
cobbler sync
cobbler check
顯示No configuration problems found.? All systems go.及為正常

$$$$$$$$$$$$$$查詢啟動端口netstat -ntulp
######################cobbler的使用
vim /etc/cobbler/settings?
mange_dhcp: 1
mange_tftpd:1
pxe_just_once:1

$$$$$$$$$$$$$$$$$$$$定制dhcp模板(Ifconfig eth0:0 192.168.10.254/24)
vi /etc/cobbler/dhcp.template
subnet 192.168.10.0 netmask 255.255.255.0 {
???? option routers???????????? 192.168.10.254;
???? option domain-name-servers 202.106.0.20;
???? option subnet-mask???????? 255.255.255.0;
???? range dynamic-bootp??????? 192.168.10.100 192.168.10.200;
???? default-lease-time???????? 21600;
???? max-lease-time???????????? 43200;
???? next-server??????????????? $next_server;
???? class "pxeclients" {
????????? match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
????????? if option pxe-system-type = 00:02 {
????????????????? filename "ia64/elilo.efi";
????????? } else if option pxe-system-type = 00:06 {
????????????????? filename "grub/grub-x86.efi";
????????? } else if option pxe-system-type = 00:07 {
????????????????? filename "grub/grub-x86_64.efi";
????????? } else {
????????????????? filename "pxelinux.0";
????????? }
???? }

}

$$$$$$$$$$$$$$$$重啟服務器 /etc/init.d/cobbler restart
cobbler sync
more /etc/dhcp/dhcpd.conf 驗證模板更新
more /etc/xinetd.d/tftp

$$$$$$$$$$$建立目錄
yum -y install lrzsz
放置ios文件目錄mkdir -pv /data/iso
???? rz選擇iso文件上傳
掛載目錄mkdir /data/sys/centos6.4_64
掛載 mount -o loop /data/iso/CentOS-6.4-x86_64-bin-DVD1.iso /data/centos6.4_64
ks文件放置目錄mkdir /data/ks/centos6.4_64
?????? rz選擇ks文件上傳
$$$$$$$$$$$$導入安裝文件
?cobbler import --path=/data/sys/centos6.4_64/ --name=centos6.4_64 --kickstart=/data/ks/centos6.4_64/ks.cfg --arch=x86_64
顯示
task started: 2015-08-14_010049_import
task started (id=Media import, time=Fri Aug 14 01:00:49 2015)
Found a candidate signature: breed=redhat, version=rhel6
Found a matching signature: breed=redhat, version=rhel6
Adding distros from path /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64:
creating new distro: centos6.4-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64 -> /var/www/cobbler/links/centos6.4-x86_64
creating new profile: centos6.4-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64 for centos6.4-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64
looking for /var/www/cobbler/ks_mirror/centos6.4_i386-x86_64/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos6.4_i386-x86_64/repodata
*** TASK COMPLETE ***
從上面顯示信息所知,cobbler會將鏡像中的拷貝到本地一份,放在/var/www/cobbler/ks_mirrors下的centos- 6.0-i386目錄下。同時會創建一個名字為centos-6.0-i386的一個發布版本,以及一個名字為centos-6.0-i386的 profile文件。

service xinetd restart?
$$$$$$$$$$$$$$$同步cobbler配置
# cobbler sync
顯示
ask started: 2011-08-11_170706_sync
task started (id=Sync, time=Thu Aug 11 17:07:06 2011)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/centos-6.0-i386
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/images/centos-6.0-i386
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
trying hardlink /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
trying hardlink /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying distros
copying files for distro: centos-6.0-i386
trying hardlink /var/www/cobbler/ks_mirror/centos-6.0-i386/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos-6.0-i386/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-6.0-i386/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos-6.0-i386/initrd.img
trying hardlink /var/www/cobbler/ks_mirror/centos-6.0-i386/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos-6.0-i386/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-6.0-i386/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos-6.0-i386/initrd.img
copying images
generating PXE configuration files
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
cleaning link caches
generating PXE menu structure
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: /etc/rc.d/init.d/dhcpd restart
received on stdout: Shutting down dhcpd: [? OK? ]
Starting dhcpd: [? OK? ]

received on stderr:
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***
cobbler會自動進行初始化工作,移除已經存在的啟動項,然后根據模板拷貝loader文件。之后再生成pxe的配置文件,生成dhcp的配置文件,最后再重啟dhcp服務。

至此,就可以使用虛擬機來測試cobbler安裝了。


本文轉自 msj0905 51CTO博客,原文鏈接:http://blog.51cto.com/sky66/1685072


本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/256834.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/256834.shtml
英文地址,請注明出處:http://en.pswp.cn/news/256834.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

[ActionScript 3.0] NetConnection建立客戶端與服務器的雙向連接

一個客戶端與服務器之間的接口測試的工具 <?xml version"1.0" encoding"utf-8"?> <!--- - - - - - - - - - - - - - - - - - - - - - - - - * author:Frost.Yen * E-mail:871979853qq.com * create:2016-7-13上午12:10:20 - - - - - - - - - - …

C++ share_prt 簡單設計和實現

C 比較煩惱的是內存的管理&#xff0c;new是簡單&#xff0c;不夠&#xff0c;delete偶爾就會忘記。或者說&#xff0c;出現&#xff0c;多個對象共享多一個內存&#xff0c;一個delete以后&#xff0c;導致其他也不能用的不良情況&#xff0c;所以就跑出了一個智能指針來進行管…

PID控制無人機

1、有效的辦法就是&#xff0c;根據距離目標值的遠近來調節云臺的速度&#xff0c;離得遠就轉快一些&#xff0c;離得近就慢一些。這樣就需要我們實時獲取云臺當前的實際角度&#xff0c;然后和目標角度做對比&#xff0c;根據差值來動態地調整云臺的速度和方向。 2、根據無人…

學習筆記(50):Python實戰編程-Frame

立即學習:https://edu.csdn.net/course/play/19711/343112?utm_sourceblogtoedu 1.Frame:是內嵌布局管理器&#xff0c;針對不同功能的組件進行區域劃分&#xff0c;在各自的區域內可以使用不同的布局&#xff0c;但是總的frame布局方式還是一致的 2.以計算器為例 步驟&#…

SVN使用MySQL驗證用戶名密碼(HTTP)

安裝過程全部采用yum 1yum -y install subversion httpd mod_auth_mysql mod_dav_svn mod_ssl 使用MySQL驗證是依賴于mod_auth_mysql 主要配置文件 12345678910111213141516171819202122<Location /svn > DAV svn SVNParentPath /var/www/html/svn AuthType Basic AuthNa…

Cent OS 6.4安裝mysql

Cent OS6.4 RPM安裝mysql 一、卸載掉原有mysql 因為目前主流Linux系統版本基本上都集成了mysql數據庫在里面 如下命令來查看我們的操作系統上是否已經安裝了mysql數據庫 [rootxiaoluo ~]# rpm -qa | grep mysql  // 這個命令就會查看該操作系統上是否已經安裝了mysql數據庫 有…

學習筆記(51):Python實戰編程-ListBox

立即學習:https://edu.csdn.net/course/play/19711/343113?utm_sourceblogtoedu listbox 知識點&#xff1a; 1)創建listbox: self.item_listbox tkinter.Listbox(self.root,selectmode "multiple", font("微軟雅黑",12),fg "black",bg &…

C++簡單工廠模式

核心思想&#xff1a;用一個工廠類根據不同的輸入條件new出不同的派生類指針&#xff0c;然后由多態調用不同派生類中virtual函數&#xff0c;得到不同的結果 所有的判斷處理在工廠類中完成&#xff0c;通過CreateFactory函數&#xff0c;根據不同的類型&#xff0c;new出派生類…

Saltstack的pillar組件(6)

pillar也是Saltstack最重要的組件之一&#xff0c;其作用是定義與被控主機相關的任何數據&#xff0c;定義好的數據可以被其他組件使用&#xff0c;如模板、state、API等。在pillar中定義的數據與不同業務特性的minion相關聯&#xff0c;這樣不同的minion只能看到自己匹配的數據…

redis投票計數

<?php /*** * 緩存利用測試&#xff0c;這里我們獲取傳過來的投票數據&#xff0c;每次加1&#xff0c;如果增加到了設定值&#xff0c;才將投票* 次數寫回mysql&#xff0c;這大大減輕了與mysql鏈接的開銷&#xff0c;redis的使用由此可見一斑* var unknown_type* 來自&am…

在linux系統中安裝VSCode(Visual Studio Code)

1.從官網下載壓縮包(話說下載下來解壓就直接可以運行了咧,都不需要make) 訪問Visual Studio Code官網 https://code.visualstudio.com/docs?dvlinux64 我是64位的: wget https://az764295.vo.msecnd.net/stable/7ba55c5860b152d999dda59393ca3ebeb1b5c85f/code-stable-code…

學習筆記(52):Python實戰編程-Radiobutton

立即學習:https://edu.csdn.net/course/play/19711/343115?utm_sourceblogtoedu 單選鈕&#xff1a;Radiobutton 1&#xff09;相對于大部分組件而言&#xff0c;最大的區別在于單選鈕綁定事件是直接通過構建單選鈕時方法中的command參數來進行事件的綁定&#xff0c;而其他的…

Linux文本查看命令之touch

touch可以用來創建文件或者修改文件的時間戳如果touch的文件不存在&#xff0c;就創建改文件touch命令可以修改文件的Access time和 Modify time-a 可以僅修改Access time注意&#xff1a;由于Access time的改變&#xff0c;Change time也改變了&#xff0c;但是如果cat該文件&…

dedecms手機站要同步pc站的圖片

首先在dede目錄下面找到 /include/extend.func.php 文件 //添加自定義函數 function replaceurl($newurl){ $newurlstr_replace(src"/1304/,src"http://www.xxx.com/1304/,$newurl); return $newurl;} 函數調用&#xff1a; functionreplaceurl(me) 例如&#xff1…

使用騰訊開發平臺獲取QQ用戶數據資料

<今天是七夕&#xff1a;祝大家七夕嗨皮&#xff0c;前可么么噠&#xff0c;后可啪啪啪> Tips&#xff1a;本篇博客將教你如何使用騰訊開發平臺獲取QQ用戶資料 ------------------------------------------------------------------------------------------------------…

C++的命名規范

1、 變量名前綴 i_ 類內數據成員&#xff08;對象級成員&#xff09; instance scope c_ 類內靜態數據成員&#xff08;類級成員&#xff09; class scope g_ 全局變量 global scope f_ 文件作用域變量&#xff08;靜態變量&…

LINUX REDHAT第十單元文檔

1.系統日志默認分類#### /var/log/messages##系統服務及日志&#xff0c;包括服務的信息&#xff0c;報錯等等 /var/log/secure##系統認證信息日志 /var/log/maillog##系統郵件服務信息 /var/log/cron##系統定時任務信息 /var/log/boot.log##系統啟動信息 2.日志管理服務rsyslo…

學習筆記(53):Python實戰編程-Checkbutton

立即學習:https://edu.csdn.net/course/play/19711/343116?utm_sourceblogtoedu 復選框Checkbutton:與單選框是相對的&#xff0c;一些用法都是類似的&#xff0c;見單選框 注&#xff1a;在設置復選框的title和index時&#xff0c;設置為選中時onvalue 1,未選中offvalue 0 …

svn merge 回滾

聊一聊 svn merge 命令。 svn 是啥就不用介紹了吧&#xff0c;誰用誰知道。有了 svn&#xff0c;開發者只要把代碼提交上去&#xff0c;無論山崩地裂、電腦進水、硬盤格式化&#xff0c;哪怕換了一臺電腦&#xff0c;都能隨時把代碼找回來。不過從自己工作中看到的現象來說&…

使用視覺信息,為什么能把移動機器人的空間位置信息記錄下來

1、首先由相機的世界坐標系&#xff0c;物體的世界坐標-》相機坐標-》到投影面坐標-》到像素坐標&#xff1b; 最終一個世界中物體的三維點被記錄在相機的一個轉化的坐標系中&#xff1b;當同時拿到很多的物體坐標時候&#xff0c;此時相機中就擁有了該 整個觀察到物體的坐標…