日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

cobbler网络装机

發布時間:2024/2/28 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 cobbler网络装机 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

cobbler網絡裝機

Cobbler是一個Linux服務器安裝的服務,可以通過網絡啟動(PXE)的方式來快速安裝、重裝物理服務器和虛擬機,同時還可以管理DHCP,DNS等。

Cobbler可以使用命令行方式管理,也提供了基于Web的界面管理工具(cobbler-web),還提供了API接口,可以方便二次開發使用。
3、Cobbler是較早前的kickstart的升級版,優點是比較容易配置,還自帶web界面比較易于管理。
4、Cobbler內置了一個輕量級配置管理系統,但它也支持和其它配置管理系統集成,如Puppet。

設置CentOS 7.6 服務端

[root@localhost opt]# yum -y install epel* 安裝軟件源[root@localhost ~]# yum -y install cobbler 安裝需要用到的軟件[root@localhost ~]# yum -y install cobbler-web dhcp tftp-server pykickstart httpd rsync xinetd 安裝所需軟件[root@localhost ~]# cd /etc/cobbler ===>進入該目錄[root@localhost ~]# vim settings ===>主配置文件(包含dhcp,tftp等等)......next_server: 192.168.136.10 ===>指向自己......server: 192.168.136.10 ===>指向自己......manage_dhcp: 1 ===>開啟dhcp......[root@localhost cobbler]# systemctl start httpd ===>啟動服務[root@localhost cobbler]# systemctl start cobblerd.service ===>啟動服務[root@localhost cobbler]# systemctl stop firewalld ===>關閉防火墻[root@localhost cobbler]# setenforce 0 ===>關閉核心防護[root@localhost cobbler]# cobbler check ===>檢測一下(下面的1-3項可以忽略不處理)1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:https://github.com/cobbler/cobbler/wiki/Selinux 2 : debmirror package is not installed, it will be required to manage debian deployments and repositories 3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them[root@localhost cobbler]# vim /etc/xinetd.d/tftp ===>修改tftp配置文件......disable = no.....[root@localhost cobbler]# systemctl enable rsyncd.service ===>啟用服務[root@localhost cobbler]# systemctl restart cobblerd.service ===>重啟一下服務[root@localhost cobbler]# cobbler check ===>可以在檢查一下還需要做哪些操作[root@localhost cobbler]# openssl passwd -1 -salt '123456' '123456' ===>設置密碼$1$123456$wOSEtcyiP2N/IfIl15W6Z0[root@localhost cobbler]# vim /etc/cobbler/settings ===>修改主配置文件......default_password_crypted: "$1$123456$wOSEtcyiP2N/IfIl15W6Z0" ===>管理員密碼......[root@localhost cobbler]# systemctl start rsyncd ===>啟動服務[root@localhost cobbler]# systemctl start xinetd ===>啟動服務[root@localhost cobbler]# cd /etc/cobbler/ ===>進入該目錄[root@localhost cobbler]# ls auth.conf ldap secondary.template cheetah_macros modules.conf settings cobbler_bash mongodb.conf tftpd.template completions named.template users.conf dhcp.template power users.digest dnsmasq.template pxe version genders.template reporting zone.template import_rsync_whitelist rsync.exclude zone_templates iso rsync.template[root@localhost cobbler]# vim dhcp.template ===>修改配置文件......subnet 192.168.136.10 netmask 255.255.255.0 {......? option routers 192.168.136.1;? option domain-name-servers 192.168.136.2;......? range dynamic-bootp 20.0.0.100 20.0.0.200;......[root@localhost cobbler]# cobbler sync ===>進行同步[root@localhost cobbler]# cobbler get-loaders ===>下載軟件(需要聯網)[root@localhost cobbler]# systemctl restart dhcpd ===>開啟服務[root@localhost cobbler]# systemctl restart cobblerd.service ===>開啟服務[root@localhost cobbler]# systemctl restart xinetd.service ===>開啟服務[root@localhost cobbler]# cobbler check ===>重新在檢測看一下 The following are potential configuration items that you may want to fix:1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:https://github.com/cobbler/cobbler/wiki/Selinux 2 : debmirror package is not installed, it will be required to manage debian deployments and repositories 3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use themRestart cobblerd and then run 'cobbler sync' to apply changes.[root@localhost cobbler]# vim /var/log/cobbler/cobbler.log ===>日志文件所在位置[root@localhost cobbler]# mount /dev/cdrom /mnt ===>掛載鏡像文件mount: /dev/sr0 寫保護,將以只讀方式掛載[root@localhost cobbler]# cobbler import --path=/mnt/ --name=CentOS-7-x86_64 --arch=x86_64 ===>定義路徑名字 將鏡像文件導入[root@localhost cobbler]# cobbler list ===>查看列表 distros:CentOS-7-x86_64profiles:CentOS-7-x86_64systems:repos:images:mgmtclasses:packages:files:[root@localhost cobbler]# yum -y install tree ===>安裝一下軟件[root@localhost cobbler]# tree /var/lib/tftpboot/images ===>查看內核文件跟引導程序[root@localhost cobbler]# systemctl restart cobblerd.service ===>重新啟動下服務[root@localhost cobbler]# systemctl restart dhcpd.service ===>重新啟動下服務[root@localhost cobbler]# systemctl restart xinetd.service ===>重新啟動下服務[root@localhost cobbler]# systemctl restart httpd.service ===>重新啟動下服務

在同一網段開始裝機

添加管理用戶用web訪問

[root@localhost cobbler]# htdigest -c /etc/cobbler/users.digest Cobbler binbin Adding password for binbin in realm Cobbler. New password: 輸入你的密碼 Re-type new password: 輸入你的密碼 [root@localhost cobbler]# systemctl restart cobblerd.service ===>重啟啟動服務 [root@localhost cobbler]# systemctl restart httpd.service ===>重啟服務 你的密碼 Re-type new password: 輸入你的密碼 [root@localhost cobbler]# systemctl restart cobblerd.service ===>重啟啟動服務 [root@localhost cobbler]# systemctl restart httpd.service ===>重啟服務

``

超強干貨來襲 云風專訪:近40年碼齡,通宵達旦的技術人生

總結

以上是生活随笔為你收集整理的cobbler网络装机的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。