{"id":30065,"date":"2025-04-20T16:21:11","date_gmt":"2025-04-20T08:21:11","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/30065.html"},"modified":"2025-04-20T16:21:11","modified_gmt":"2025-04-20T08:21:11","slug":"rockylinux%e9%85%8d%e7%bd%aecobbler%e6%97%a0%e4%ba%ba%e5%80%bc%e5%ae%88%e5%ae%89%e8%a3%85%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/30065.html","title":{"rendered":"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1"},"content":{"rendered":"<h4>1. \u73af\u5883<\/h4>\n<p> Cobbler=3.2<br \/>\nLinux=RockyLinux-8.6<br \/>\n#\u5ba2\u6237\u7aef\u6d4b\u8bd5\u73af\u5883<br \/>\nLinux=RockyLinux-8.6<br \/>\nLinux=CentOS-7.9<br \/>\n#\u955c\u50cf<br \/>\n\u5b98\u65b9\u5b8c\u6574\u7248\u955c\u50cf <\/p>\n<h4>2. \u5173\u95ed\u9632\u706b\u5899\u548cselinux<\/h4>\n<p> setenforce 0<br \/>\nsed -i \\&#8217;s\/^SELINUX=.*\/SELINUX=disabled\/\\&#8217; \/etc\/selinux\/config<br \/>\nsystemctl disable &#8211;now firewalld <\/p>\n<h4>3. \u5b89\u88c5\u4f9d\u8d56\u5305\u53caCobbler3.2<\/h4>\n<p> \u200b<br \/>\nyum install epel-release &nbsp;-y<br \/>\nyum module list | grep cobbler<br \/>\ndnf module enable cobbler:3 -y<br \/>\nyum install rsync rsync-daemon httpd dhcp-server tftp tftp-server cobbler cobbler-web pykickstart vim grub2-* yum-utils syslinux* -y<br \/>\nsystemctl enable &#8211;now cobblerd httpd rsyncd tftp <\/p>\n<h4>4. \u914d\u7f6eCobbler\u6587\u4ef6<\/h4>\n<p> sed -i.bak \\&#8217;s\/^server: 127.0.0.1\/server: 192.168.75.131\/\\&#8217; \/etc\/cobbler\/settings.yaml<br \/>\nsed -i \\&#8221;s#next_server: 127.0.0.1#next_server: 192.168.75.131#\\&#8221; \/etc\/cobbler\/settings.yaml<br \/>\nsed -i \\&#8221;s#manage_dhcp: false#manage_dhcp: true#\\&#8221; \/etc\/cobbler\/settings.yaml<br \/>\n#\u751f\u6210\u9ed8\u8ba4\u7cfb\u7edfroot\u5bc6\u7801<br \/>\nopenssl passwd -1 -salt \\&#8221;$RANDOM\\&#8221; \\&#8217;root\\&#8217;<br \/>\nvim \/etc\/cobbler\/settings.yaml<br \/>\n&#8230;.<br \/>\ndefault_password_crypted: \\&#8221;$1$mF86\/UHC$WvcIcX2t6crBz2onWxyac.\\&#8221;<br \/>\n&#8230;.<br \/>\n#\u9a8c\u8bc1\u4fee\u6539<br \/>\negrep \\&#8217;^server:|^next_server|^manage_dhcp|^default_password_\\&#8217; \/etc\/cobbler\/settings.yaml<br \/>\n\\&#8217;\\&#8217;\\&#8217;<br \/>\ndefault_password_crypted: \\&#8221;$1$mF86\/UHC$WvcIcX2t6crBz2onWxyac.\\&#8221;<br \/>\nmanage_dhcp: true<br \/>\nnext_server: 192.168.75.131<br \/>\nserver: 192.168.75.131<br \/>\n\\&#8217;\\&#8217;\\&#8217; <\/p>\n<h4>5. \u914d\u7f6eDHCP\u670d\u52a1\u6478\u7248<\/h4>\n<p>vim \/etc\/cobbler\/dhcp.template<\/p>\n<p> &#8230;<br \/>\nsubnet 192.168.75.0 netmask 255.255.255.0 {  \/\/\u4fee\u6539\u6b64\u5904\u7f51\u6bb5<br \/>\n &nbsp; &nbsp; option routers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 192.168.75.2;  \/\/\u4fee\u6539\u6b64\u5904\u7f51\u5173<br \/>\n &nbsp; &nbsp; option domain-name-servers 114.114.114.114;  \/\/\u4fee\u6539\u6b64\u5904dns<br \/>\n &nbsp; &nbsp; option subnet-mask &nbsp; &nbsp; &nbsp; &nbsp; 255.255.255.0;<br \/>\n &nbsp; &nbsp; range dynamic-bootp &nbsp; &nbsp; &nbsp;  192.168.75.100 192.168.75.200; \/\/\u5730\u5740\u6c60<br \/>\n &nbsp; &nbsp; default-lease-time 21600;<br \/>\n &nbsp; &nbsp; max-lease-time 43200;<br \/>\n &nbsp; &nbsp; next-server $next_server;<br \/>\n}<br \/>\n&#8230;. <\/p>\n<h6>5.1 \u914d\u7f6eDNSMASQ\u670d\u52a1\u6478\u7248(\u5982\u4f7f\u7528dnsmasq\u670d\u52a1\u914d\u7f6e,\u66ff\u4ee3\u9ed8\u8ba4dhcp)<\/h6>\n<p>vim \/etc\/cobbler\/dnsmasq.template<\/p>\n<p> &#8230;<br \/>\n# Cobbler generated configuration file for dnsmasq<br \/>\n# $date<br \/>\n#<br \/>\n\u200b<br \/>\n# resolve.conf .. ?<br \/>\n#no-poll<br \/>\n#enable-dbus<br \/>\nread-ethers<br \/>\naddn-hosts = \/var\/lib\/cobbler\/co<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf19\u6b21\u3002Cobbler \u662flinux\u7cfb\u7edf\u7684\u4e00\u4e2a\u670d\u52a1\uff0c\u53ef\u4ee5\u901a\u8fc7PXE\u7f51\u7edc\u542f\u52a8\uff0c\u5b8c\u6210\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u7cfb\u7edf\u3002Cobbler\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u6216web\u9875\u9762\u8fdb\u884c\u7ba1\u7406\uff0c\u8fd8\u63d0\u4f9b\u4e86API\u63a5\u53e3\uff0c\u65b9\u4fbf\u4e8c\u6b21\u5f00\u53d1\u3002Cobbler\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7ba1\u7406\u670d\u52a1\uff0c\u53ef\u4ee5\u914d\u7f6epuppet\u5b9e\u73b0\u7ba1\u7406\u3002_rocky \u5b89\u88c5cobbler<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2429,58,1105,97,43,2428],"topic":[],"class_list":["post-30065","post","type-post","status-publish","format-standard","hentry","category-server","tag-cobbler","tag-linux","tag-pxe","tag-97","tag-43","tag-2428"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/30065.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf19\u6b21\u3002Cobbler \u662flinux\u7cfb\u7edf\u7684\u4e00\u4e2a\u670d\u52a1\uff0c\u53ef\u4ee5\u901a\u8fc7PXE\u7f51\u7edc\u542f\u52a8\uff0c\u5b8c\u6210\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u7cfb\u7edf\u3002Cobbler\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u6216web\u9875\u9762\u8fdb\u884c\u7ba1\u7406\uff0c\u8fd8\u63d0\u4f9b\u4e86API\u63a5\u53e3\uff0c\u65b9\u4fbf\u4e8c\u6b21\u5f00\u53d1\u3002Cobbler\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7ba1\u7406\u670d\u52a1\uff0c\u53ef\u4ee5\u914d\u7f6epuppet\u5b9e\u73b0\u7ba1\u7406\u3002_rocky \u5b89\u88c5cobbler\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/30065.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-20T08:21:11+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30065.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/30065.html\",\"name\":\"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-20T08:21:11+00:00\",\"dateModified\":\"2025-04-20T08:21:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/30065.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/30065.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/30065.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/30065.html","og_locale":"zh_CN","og_type":"article","og_title":"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e9\u6b21\uff0c\u6536\u85cf19\u6b21\u3002Cobbler \u662flinux\u7cfb\u7edf\u7684\u4e00\u4e2a\u670d\u52a1\uff0c\u53ef\u4ee5\u901a\u8fc7PXE\u7f51\u7edc\u542f\u52a8\uff0c\u5b8c\u6210\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u7cfb\u7edf\u3002Cobbler\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u6216web\u9875\u9762\u8fdb\u884c\u7ba1\u7406\uff0c\u8fd8\u63d0\u4f9b\u4e86API\u63a5\u53e3\uff0c\u65b9\u4fbf\u4e8c\u6b21\u5f00\u53d1\u3002Cobbler\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u7ba1\u7406\u670d\u52a1\uff0c\u53ef\u4ee5\u914d\u7f6epuppet\u5b9e\u73b0\u7ba1\u7406\u3002_rocky \u5b89\u88c5cobbler","og_url":"https:\/\/www.wsisp.com\/helps\/30065.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-20T08:21:11+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/30065.html","url":"https:\/\/www.wsisp.com\/helps\/30065.html","name":"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-20T08:21:11+00:00","dateModified":"2025-04-20T08:21:11+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/30065.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/30065.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/30065.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"RockyLinux\u914d\u7f6ecobbler\u65e0\u4eba\u503c\u5b88\u5b89\u88c5\u670d\u52a1"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=30065"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/30065\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=30065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=30065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=30065"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=30065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}