Cobbler實現開機自動安裝CentOS 7.1 X86_64

來源:互聯網
上載者:User

標籤:cobbler

1、安裝準備

[[email protected] ~]# yum install cobbler cobbler-web dhcp tftp-server pykickstart  httpd -y[[email protected] ~]# /etc/init.d/httpd restart

2、安裝配置Cobbler

[[email protected] ~]# /etc/init.d/cobblerd start[[email protected] ~]# 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 : 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 : change ‘disable‘ to ‘no‘ in /etc/xinetd.d/rsync5 : reposync is not installed, need for cobbler reposync, install/upgrade yum-utils?6 : debmirror package is not installed, it will be required to manage debian deployments and repositories7 : 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 one8 : 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.

第一步+第二步

vim /etc/cobbler/settings  server: 10.0.0.7 next_server: 10.0.0.7manage_dhcp: 1

第三步:

cobbler get-loaders

第四步:

[[email protected] ~]# vim /etc/xinetd.d/rsyncchange ‘disable‘ to ‘no‘[[email protected] ~]# /etc/init.d/xinetd restart

第七步:

openssl passwd -1 -salt ‘oldboy‘ ‘oldboy‘default_password_crypted: "$1$oldboy$fXF8f078vI9J/q9XyXA8e/"[[email protected] ~]# yum install -y debmirror yum-utils fence-agents[[email protected] ~]# /etc/init.d/cobblerd restart[[email protected] ~]# cobbler check[[email protected] ~]#vim /etc/cobbler/dhcp.templatesubnet 10.0.0.0 netmask 255.255.255.0 {     option routers             10.0.0.2;     option domain-name-servers 10.0.0.2;     option subnet-mask         255.255.255.0;     range dynamic-bootp        10.0.0.100 10.0.0.200;

 ##Cobbler同步   

[[email protected] ~]# cobbler sync[[email protected] ~]# cobbler import --path=/mnt/ --name=CentOS-7.1-x86_64 --arch=x86_64
KS檔案放這裡: cd /var/lib/cobbler/kickstarts/[[email protected] kickstarts]# mv Cobbler-CentOS-7.1-x86_64.cfg CentOS-7.1-x86_64.cfg[[email protected] kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kickstart=/var/lib/cobbler/kickstarts/CentOS-7.1-x86_64.cfg[[email protected] kickstarts]# cobbler profile edit --name=CentOS-7.1-x86_64 --kopts=‘net.ifnames=0 biosdevname=0‘#修改Cobbler提示vim /etc/cobbler/pxe/pxedefault.template MAC  00:0C:29:2B:4E:83cobbler system add --name=oldboy --mac=00:0C:29:2B:4E:83 --profile=CentOS-7.1-x86_64 --ip-address=10.0.0.111 --subnet=255.255.255.0 --gateway=10.0.0.2 --interface=eth0 --static=1 --hostname=oldboy.example.com --name-servers=10.0.0.2


本文出自 “萬越天的架構師之路” 部落格,請務必保留此出處http://wanyuetian.blog.51cto.com/3984643/1717855

Cobbler實現開機自動安裝CentOS 7.1 X86_64

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.