{"id":3172,"date":"2014-03-11T14:10:00","date_gmt":"2014-03-11T06:10:00","guid":{"rendered":"http:\/\/blog.hmouse.tk\/?p=3172"},"modified":"2014-03-13T16:07:06","modified_gmt":"2014-03-13T08:07:06","slug":"cobbler-%e5%ae%89%e8%a3%85%e6%89%8b%e5%86%8c","status":"publish","type":"post","link":"https:\/\/www.hmouse.cn\/?p=3172","title":{"rendered":"Cobbler \u5b89\u88c5\u624b\u518c"},"content":{"rendered":"<p>\u53c2\u8003\u6587\u6863URL\uff1a<a title=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/\" href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/\">http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/<\/a><\/p>\n<p>\u5b89\u88c5epel\u6e90<\/p>\n<p>rpm -ivh <a href=\"http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\">http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm<\/a><\/p>\n<p><code>\u5b89\u88c5 cobbler \u548c cobbler-web<\/code><\/p>\n<p><code>yum -y install cobbler fence-agents cobbler-web <\/code><\/p>\n<p><code>\u914d\u7f6e\u6587\u4ef6 \uff08\u7ea2\u8272\u7684\u662f\u4fee\u6539\u90e8\u5206\uff09<\/code><\/p>\n<p>\u4e3b\u8981\u7684 Cobbler \u914d\u7f6e\u6587\u4ef6\u662f \/etc\/cobbler\/settings\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5e76\u8bbe\u7f6e\u4ee5\u4e0b\u9009\u9879\uff1a  <\/p>\n<ul>\n<li>manage_dhcp\uff1a1\n<li>manage_dns\uff1a1\n<li>manage_tftpd\uff1a1\n<li>restart_dhcp\uff1a1\n<li>restart_dns\uff1a1\n<li>pxe_just_once\uff1a1\n<li>next_server\uff1a&lt;\u670d\u52a1\u5668\u7684 IP \u5730\u5740&gt;\n<li>server\uff1a&lt;\u670d\u52a1\u5668\u7684 IP \u5730\u5740&gt;<\/li>\n<\/ul>\n<p>\/etc\/cobbler\/dnsmasq.template&nbsp;&nbsp; \uff08\u4e3b\u8981\u662f\u6307\u5b9adhcp\u76f8\u5173\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>read-ethers<br \/>addn-hosts = \/var\/lib\/cobbler\/cobbler_hosts<\/p>\n<p><font color=\"#ff0000\">dhcp-range=192.168.10.1,192.168.20.254,255.255.0.0,192.168.0.19<br \/><\/font>dhcp-option=3,$next_server<br \/>dhcp-lease-max=600000<br \/>dhcp-authoritative<br \/>dhcp-boot=pxelinux.0<br \/>dhcp-boot=net:normalarch,pxelinux.0<br \/>dhcp-boot=net:ia64,$elilo<br \/><font color=\"#ff0000\">server=8.8.8.8<\/font><\/p>\n<p>$insert_cobbler_system_definitions<\/p>\n<p>&nbsp;<\/p>\n<p>vi \/etc\/cobbler\/modules.conf&nbsp; \uff08\u6a21\u5757\u76f8\u5173\uff09<\/p>\n<p>[root@pxe-test1 ~]# cat&nbsp; \/etc\/cobbler\/modules.conf | grep -v &#8220;#&#8221;<\/p>\n<p><font color=\"#ff0000\">[authentication]<br \/>module = authn_pam<\/font><\/p>\n<p><font color=\"#ff0000\">[authorization]<br \/>module = authz_ownership<\/font><\/p>\n<p>[dns]<br \/>module = manage_bind<\/p>\n<p>&nbsp; <br \/><font color=\"#ff0000\">[dhcp]<br \/>module = manage_dnsmasq<\/font><br \/>&nbsp; <br \/>[tftpd]<br \/>module = manage_in_tftpd<\/p>\n<p>\u4fee\u6539\/etc\/cobbler\/users.conf&nbsp;&nbsp; \uff08web\u767b\u9646\u76f8\u5173\uff09<\/p>\n<p>[admins]<br \/>admin = &#8220;admin&#8221;<\/p>\n<p>[root@localhost home]# useradd admin<br \/>[root@localhost home]# passwd admin<br \/>\u66f4\u6539\u7528\u6237 admin \u7684\u5bc6\u7801 \u3002<br \/>\u65b0\u7684 \u5bc6\u7801\uff1a<br \/>\u65e0\u6548\u7684\u5bc6\u7801\uff1a \u5b83\u6ca1\u6709\u5305\u542b\u8db3\u591f\u7684\u4e0d\u540c\u5b57\u7b26<br \/>\u65e0\u6548\u7684\u5bc6\u7801\uff1a \u8fc7\u4e8e\u7b80\u5355<br \/>\u91cd\u65b0\u8f93\u5165\u65b0\u7684 \u5bc6\u7801\uff1a<br \/>passwd\uff1a \u6240\u6709\u7684\u8eab\u4efd\u9a8c\u8bc1\u4ee4\u724c\u5df2\u7ecf\u6210\u529f\u66f4\u65b0\u3002<br \/>[root@localhost home]# <\/p>\n<p>\u6dfb\u52a0admin \u8d26\u53f7\u548c\u5bc6\u7801<\/p>\n<p>&nbsp;<\/p>\n<pre>service cobblerd start\nservice httpd start\n<\/pre>\n<p>&nbsp;<\/p>\n<p>openssl passwd -1 -salt &#8216;random-phrase-here&#8217; &#8216;ceshi123&#8217;<\/p>\n<p>$1$random-p$aOwnan1tNacGA8GVU0ovJ.<\/p>\n<p>\u52a0\u5bc6\u5b57\u7b26\u4e32\u3002<\/p>\n<p>\u4e4b\u524d\u5728hardlink \u4e00\u76f4fail \u67e5\u770b\u65e5\u5fd7\u624d\u53d1\u73b0 \/usr\/sbin\/hardlink \u6ca1\u6709<\/p>\n<p>\u8bf7\u5b89\u88c5&nbsp; yum -y install hardlink<\/p>\n<p>&nbsp;<\/p>\n<p>centos \u5bfc\u5165\u5f88\u7b80\u5355\uff0c\u6211\u540e\u6765\u53c8\u6dfb\u52a0\u4e86esx4.1\u7684\u7f51\u7edc\u5b89\u88c5<\/p>\n<p>\u6302\u8f7d<\/p>\n<p>mount -t auto -o loop&nbsp; \/root\/VMWare-server-esx-4.1.0-260247.iso \/mnt\/<\/p>\n<p>\u5bfc\u5165<\/p>\n<p>cobbler import &#8211;path=\/mnt &#8211;name=esx4.1 &#8211;arch=x86_64<\/p>\n<p>\u5373\u53ef\uff0c\u901a\u8fc7cobbler-web\u76f4\u63a5\u53ef\u4ee5\u770b\u5230<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2014\/03\/image24.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2014\/03\/image_thumb24.png\" width=\"244\" height=\"53\"><\/a><\/p>\n<p>\u4e0d\u8fc7\u540e\u7eed\u7684\u6d4b\u8bd5esx4.1 \u8fd8\u662f\u5b89\u88c5\u4e0d\u4e86\uff0c\u7f51\u5361\u6709\u95ee\u9898\uff0c\u7f51\u4e0a\u770besxi5.1\u7684\u7248\u672c\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u6587\u6863URL\uff1a<a title=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/\" href=\"http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/\">http:\/\/www.ibm.com\/developerworks\/cn\/linux\/l-cobbler\/<\/a><\/p>\n<p>\u5b89\u88c5epel\u6e90<\/p>\n<p>rpm -ivh <a href=\"http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\">http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm<\/a><\/p>\n<p><code>\u5b89\u88c5 cobbler \u548c cobbler-web<\/code><\/p>\n<p><code>yum -y install cobbler fence-agents cobbler-web <\/code><\/p>\n<p><code>\u914d\u7f6e\u6587\u4ef6 \uff08\u7ea2\u8272\u7684\u662f\u4fee\u6539\u90e8\u5206\uff09<\/code><\/p>\n<p>\u4e3b\u8981\u7684 Cobbler \u914d\u7f6e\u6587\u4ef6\u662f \/etc\/cobbler\/settings\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\uff0c\u5e76\u8bbe\u7f6e\u4ee5\u4e0b\u9009\u9879\uff1a  <\/p>\n<ul>\n<li>manage_dhcp\uff1a1\n<li>manage_dns\uff1a1\n<li>manage_tftpd\uff1a1\n<li>restart_dhcp\uff1a1\n<li>restart_dns\uff1a1\n<li>pxe_just_once\uff1a1\n<li>next_server\uff1a&lt;\u670d\u52a1\u5668\u7684 IP \u5730\u5740&gt;\n<li>server\uff1a&lt;\u670d\u52a1\u5668\u7684 IP \u5730\u5740&gt;<\/li>\n<\/ul>\n<p>\/etc\/cobbler\/dnsmasq.template&nbsp;&nbsp; \uff08\u4e3b\u8981\u662f\u6307\u5b9adhcp\u76f8\u5173\uff09<\/p>\n<p>&nbsp;<\/p>\n<p>read-ethers<br \/>addn-hosts = \/var\/lib\/cobbler\/cobbler_hosts<\/p>\n<p><font color=\"#ff0000\">dhcp-range=192.168.10.1,192.168.20.254,255.255.0.0,192.168.0.19<br \/><\/font>dhcp-option=3,$next_server<br \/>dhcp-lease-max=600000<br \/>dhcp-authoritative<br \/>dhcp-boot=pxelinux.0<br \/>dhcp-boot=net:normalarch,pxelinux.0<br \/>dhcp-boot=net:ia64,$elilo<br \/><font color=\"#ff0000\">server=8.8.8.8<\/font><\/p>\n<p>$insert_cobbler_system_definitions<\/p>\n<p>&nbsp;<\/p>\n<p>vi \/etc\/cobbler\/modules.conf&nbsp; \uff08\u6a21\u5757\u76f8\u5173\uff09<\/p>\n<p>[root@pxe-test1 ~]# cat&nbsp; \/etc\/cobbler\/modules.conf | grep -v &#8220;#&#8221;<\/p>\n<p><font color=\"#ff0000\">[authentication]<br \/>module = authn_pam<\/font><\/p>\n<p><font color=\"#ff0000\">[authorization]<br \/>module = authz_ownership<\/font><\/p>\n<p>[dns]<br \/>module = manage_bind<\/p>\n<p>&nbsp; <br \/><font color=\"#ff0000\">[dhcp]<br \/>module = manage_dnsmasq<\/font><br \/>&nbsp; <br \/>[tftpd]<br \/>module = manage_in_tftpd<\/p>\n<p>\u4fee\u6539\/etc\/cobbler\/users.conf&nbsp;&nbsp; \uff08web\u767b\u9646\u76f8\u5173\uff09<\/p>\n<p>[admins]<br \/>admin = &#8220;admin&#8221;<\/p>\n<p>[root@localhost home]# useradd admin<br \/>[root@localhost home]# passwd admin<br \/>\u66f4\u6539\u7528\u6237 admin \u7684\u5bc6\u7801 \u3002<br \/>\u65b0\u7684 \u5bc6\u7801\uff1a<br \/>\u65e0\u6548\u7684\u5bc6\u7801\uff1a \u5b83\u6ca1\u6709\u5305\u542b\u8db3\u591f\u7684\u4e0d\u540c\u5b57\u7b26<br \/>\u65e0\u6548\u7684\u5bc6\u7801\uff1a \u8fc7\u4e8e\u7b80\u5355<br \/>\u91cd\u65b0\u8f93\u5165\u65b0\u7684 \u5bc6\u7801\uff1a<br \/>passwd\uff1a \u6240\u6709\u7684\u8eab\u4efd\u9a8c\u8bc1\u4ee4\u724c\u5df2\u7ecf\u6210\u529f\u66f4\u65b0\u3002<br \/>[root@localhost home]# <\/p>\n<p>\u6dfb\u52a0admin \u8d26\u53f7\u548c\u5bc6\u7801<\/p>\n<p>&nbsp;<\/p>\n<pre>service cobblerd start\nservice httpd start\n<\/pre>\n<p>&nbsp;<\/p>\n<p>openssl passwd -1 -salt &#8216;random-phrase-here&#8217; &#8216;ceshi123&#8217;<\/p>\n<p>$1$random-p$aOwnan1tNacGA8GVU0ovJ.<\/p>\n<p>\u52a0\u5bc6\u5b57\u7b26\u4e32\u3002<\/p>\n<p>\u4e4b\u524d\u5728hardlink \u4e00\u76f4fail \u67e5\u770b\u65e5\u5fd7\u624d\u53d1\u73b0 \/usr\/sbin\/hardlink \u6ca1\u6709<\/p>\n<p>\u8bf7\u5b89\u88c5&nbsp; yum -y install hardlink<\/p>\n<p>&nbsp;<\/p>\n<p>centos \u5bfc\u5165\u5f88\u7b80\u5355\uff0c\u6211\u540e\u6765\u53c8\u6dfb\u52a0\u4e86esx4.1\u7684\u7f51\u7edc\u5b89\u88c5<\/p>\n<p>\u6302\u8f7d<\/p>\n<p>mount -t auto -o loop&nbsp; \/root\/VMWare-server-esx-4.1.0-260247.iso \/mnt\/<\/p>\n<p>\u5bfc\u5165<\/p>\n<p>cobbler import &#8211;path=\/mnt &#8211;name=esx4.1 &#8211;arch=x86_64<\/p>\n<p>\u5373\u53ef\uff0c\u901a\u8fc7cobbler-web\u76f4\u63a5\u53ef\u4ee5\u770b\u5230<\/p>\n<p><a href=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2014\/03\/image24.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.hmouse.cn\/wp-content\/uploads\/2014\/03\/image_thumb24.png\" width=\"244\" height=\"53\"><\/a><\/p>\n<p>\u4e0d\u8fc7\u540e\u7eed\u7684\u6d4b\u8bd5esx4.1 \u8fd8\u662f\u5b89\u88c5\u4e0d\u4e86\uff0c\u7f51\u5361\u6709\u95ee\u9898\uff0c\u7f51\u4e0a\u770besxi5.1\u7684\u7248\u672c\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-3172","post","type-post","status-publish","format-standard","hentry","category-5","tag-cobbler","category-5-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/3172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3172"}],"version-history":[{"count":5,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/3172\/revisions"}],"predecessor-version":[{"id":3180,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=\/wp\/v2\/posts\/3172\/revisions\/3180"}],"wp:attachment":[{"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hmouse.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}