您好,登錄后才能下訂單哦!
本篇內(nèi)容介紹了“用Cobbler定制化安裝指定的系統(tǒng)”的有關(guān)知識,在實際案例的操作過程中,不少人都會遇到這樣的困境,接下來就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細閱讀,能夠?qū)W有所成!
環(huán)境:
CentOS
Linux release 7.6.1810
VMware Workstation Pro 14
新建VM 虛擬機
MAC 地址為 00:50:56:3E:F0:C6
使用 Cobbler 安裝系統(tǒng)時,指定好系統(tǒng)的 IP地址,鏡像,網(wǎng)關(guān),主機名等信息
[root@localhost kickstarts]# pwd /var/lib/cobbler/kickstarts [root@Jaking kickstarts]# cobbler system add \ --name=Jaking-custom \ --mac=00:50:56:3E:F0:C6 \ --profile=CentOS-7.6-x86_64 \ --ip-address=192.168.1.163 \ --subnet=255.255.255.0 \ --gateway=192.168.1.1 \ --interface=eth0 \ --static=1 \ --hostname=Jaking-custom \ --name-servers="192.168.1.1" \ --kickstart=/var/lib/cobbler/kickstarts/CentOS7.ks
查看 system 列表
[root@Jaking kickstarts]# cobbler system list Jaking-custom
同步 Cobbler 配置
[root@Jaking kickstarts]# systemctl restart cobblerd [root@Jaking kickstarts]# cobbler sync
查看 DHCP 配置,發(fā)現(xiàn) DHCP 服務(wù)器,已經(jīng)加入 IP 和 MAC 的對應(yīng)關(guān)系。
[root@Jaking kickstarts]# cat /etc/dhcp/dhcpd.conf # ****************************************************************** # Cobbler managed dhcpd.conf file # generated from cobbler dhcp.conf template (Sat Jan 4 10:52:04 2020) # Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes # in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be # overwritten. # ****************************************************************** 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.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; option domain-name-servers 114.114.114.114; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.1.100 192.168.1.254; default-lease-time 21600; max-lease-time 43200; next-server 192.168.1.7; 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 if option pxe-system-type = 00:09 { filename "grub/grub-x86_64.efi"; } else { filename "pxelinux.0"; } } } # group for Cobbler DHCP tag: default group { host generic1 { hardware ethernet 00:50:56:3E:F0:C6; fixed-address 192.168.1.163; option host-name "Jaking-custom"; option subnet-mask 255.255.255.0; option routers 192.168.1.1; filename "/pxelinux.0"; next-server 192.168.1.7; } } #多了以上自定義配置
開機,自動安裝指定系統(tǒng)
直接安裝無需等待,并且已經(jīng)預(yù)先設(shè)置網(wǎng)絡(luò)相關(guān)參數(shù)。
輸入 root 123456(服務(wù)端定義好的密碼) 登錄系統(tǒng):
MAC 地址為 00:50:56:3E:F0:C6 的系統(tǒng)獲取到了指定的 IP 192.168.1.163
“用Cobbler定制化安裝指定的系統(tǒng)”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識可以關(guān)注億速云網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實用文章!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。