ubuntu裝cobbler


 安裝cobbler

1、Cobbler 2.9新增uefi支持
2、Cobbler 2.9依賴syslinux 6.x版本支持

 1 apt-get install apache2 libapache2-mod-wsgi python-cheetah python-netaddr python-simplejson python-urlgrabber python-yaml python-django make gcc git automake python-pip
 2 apt-get install tftpd-hpa
 3 apt-get install nasm uuid-dev
 4 wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
 5 tar zxfv syslinux-6.03.tar.gz
 6 cd syslinux-6.03
 7 pip3 install future distro coverage
 8 make && make install
 9 git clone https://github.com/cobbler/cobbler.git
10 cd cobbler
11 pip3 install future distro coverage netaddr simplejson pyyaml Cheetah3
12 make
13 make install
14 ln -s /etc/apache2/conf-available/cobbler.conf /etc/apache2/conf-enabled/
root@ubuntu_18_1:/etc/apache2# cp mods-available/proxy_http.load mods-enabled/
root@ubuntu_18_1:/etc/apache2# cp mods-available/proxy.load mods-enabled/ 15 systemctl start apache2.service 16 pip3 install netaddr simplejson pyyaml Cheetah3 17 cp /etc/cobbler/cobblerd.service /lib/systemd/system/cobbler.service 18 systemctl start cobbler

 

1.apache啟動報錯:Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration

解決方法:必須禁用代理模塊。使用以下命令啟用它

# a2enmod proxy

 

2.通過cobbler命令進行環境監測,問題如下:

 

[root@linux-cobbler ~]# cobbler check
4.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.
解決辦法:
# sed -i 's/server: 127.0.0.1/server: 192.168.56.11/' /etc/cobbler/settings #改為本機的IP地址
或通過vim 打開/etc/cobbler/settings進行修改
4.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.
解決辦法:
# sed -i 's/next_server: 127.0.0.1/next_server: 192.168.56.11/' /etc/cobbler/settings #改為本機的IP地址
或通過vim 更改為本機IP地址
4.3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
解決辦法:
# vim /etc/xinetd.d/tftp
將disable = yes 改為disable = no
# systemctl  restart xinetd
4.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.
解決辦法:
# cobbler get-loaders #會下載相關的啟動文件 
4.5 : enable and start rsyncd.service with systemctl 解決辦法: # systemctl enable rsyncd && systemctl start rsyncd 4.6 : debmirror package is not installed, it will be required to manage debian deployments and repositories #安裝debmirror 包 # yum install debmirror vim /etc/debmirror.conf #將23和25行注釋掉 28 #@dists="sid"; 30 #@arches="i386"; 4.7 : 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 解決辦法: # openssl passwd -1 -salt "隨機短語" "密碼" # openssl passwd -1 -salt 'suijishu' '123456' $1$suijishu$pCi13H6xgVMoQBkitx4rg/ #將生成的密碼添加到到/etc/cobbler/settings # vim /etc/cobbler/settings #替換默認密碼 101 default_password_crypted: "$1$suijishu$pCi13H6xgVMoQBkitx4rg/" [root@linux-node1 ~]# systemctl restart cobblerd #更改配置文件要重啟服務 4.8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them #fence設備,電源管理 # yum install cman fence-agents 
4.9:重啟cobblerd再次檢查: [root@linux-cobbler ~]# systemctl restart cobblerd [root@linux-cobbler ~]# cobbler check No configuration problems found. All systems go. #確認檢查沒有遇到任何問題,如果有問題按照提示處理
a2enmod rewrite
a2enmod proxy
a2enmod python
a2enmod proxy_http
a2enmod proxy_connect
a2enmod wsgi
a2enmod version
cobbler check錯誤 xmlrpc.client.ProtocolError:

 

 

 

cobbler相關組件

#httpd 和cobbler-web 提供cobbler的web管理界面

#dhcp 提供IP地址分配服務

#xinetd 是一個超級守護進程,管理無法開機啟動的服務如tftp開機啟動

其中cobbelr是最核心的安裝包,期安裝后的主要目錄如下:

/etc/cobbler                   # cobbler的主配置文件目錄,保存了與cobbler相關的配置文件
/etc/cobbler/settings         # cobble服務的默認主配置文件
/etc/cobbler/dhcp.template    # DHCP服務的配置模板,打開DHCP管理后可以根據此文件生成dhcpd.conf文件
/etc/cobbler/tftpd.template  # tftp服務的配置模板
/etc/cobbler/rsync.template # rsync服務的配置模板
/etc/cobbler/iso              # iso模板配置文件目錄
/etc/cobbler/pxe              # pxe模板文件目錄
/etc/cobbler/power            # 電源的配置文件目錄
/etc/cobbler/users.conf       # Web服務授權配置文件
/etc/cobbler/users.digest     # web訪問的用戶名密碼配置文件
/etc/cobbler/dnsmasq.template # DNS服務的配置模板
/etc/cobbler/modules.conf     # Cobbler模塊配置文件
/var/lib/cobbler               # Cobbler數據目錄
/var/lib/cobbler/config       # 配置文件
/var/lib/cobbler/kickstarts  # 默認存放kickstart文件
/var/lib/cobbler/loaders      # 存放的各種引導程序
/var/www/cobbler               # 系統安裝鏡像目錄
/var/www/cobbler/ks_mirror    # 導入的系統鏡像列表
/var/www/cobbler/images       # 導入的系統鏡像啟動文件
/var/www/cobbler/repo_mirror  # yum源存儲目錄
/var/log/cobbler               # 日志目錄
/var/log/cobbler/install.log  # 客戶端系統安裝日志
/var/log/cobbler/cobbler.log  # cobbler日志 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM