{"id":341,"date":"2026-04-07T00:23:49","date_gmt":"2026-04-06T16:23:49","guid":{"rendered":"https:\/\/www.loongdi.net\/blog\/?p=341"},"modified":"2026-04-07T00:23:49","modified_gmt":"2026-04-06T16:23:49","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e5%be%b7%e8%ae%af%e7%94%b5%e8%ae%af%e6%8f%90%e4%be%9b%e7%9a%84centos%e6%ba%90%e8%bf%9b%e8%a1%8c%e6%8d%a2%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.loongdi.net\/blog\/341.html","title":{"rendered":"\u5982\u4f55\u4f7f\u7528\u5fb7\u8baf\u7535\u8baf\u63d0\u4f9b\u7684CentOS\u6e90\u8fdb\u884c\u6362\u6e90"},"content":{"rendered":"<p><h3>\u4ec0\u4e48\u662fCentOS\u6362\u6e90<\/h3>\n<\/p>\n<p><p>CentOS\u662f\u4e00\u4e2a\u57fa\u4e8eRed Hat Enterprise Linux\u7684\u514d\u8d39\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u8f6f\u4ef6\u5305\uff0c\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u5b89\u88c5\u548c\u914d\u7f6e\u3002\u7136\u800c\uff0c\u7531\u4e8e\u5730\u7406\u4f4d\u7f6e\u548c\u670d\u52a1\u5668\u8d1f\u8f7d\u7684\u539f\u56e0\uff0c\u9ed8\u8ba4\u7684CentOS\u6e90\u53ef\u80fd\u4f1a\u5b58\u5728\u901f\u5ea6\u6162\u3001\u4e0d\u7a33\u5b9a\u7684\u95ee\u9898\u3002\u56e0\u6b64\uff0c\u6362\u6e90\uff08\u5373\u66f4\u6362\u8f6f\u4ef6\u5305\u7684\u4e0b\u8f7d\u6e90\uff09\u6210\u4e3a\u4e86\u63d0\u9ad8\u7cfb\u7edf\u6027\u80fd\u548c\u7a33\u5b9a\u6027\u7684\u5e38\u7528\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.loongdi.net\/blog\/wp-content\/uploads\/2026\/03\/DNl17oPX.jpg\" alt=\"\u5982\u4f55\u4f7f\u7528\u5fb7\u8baf\u7535\u8baf\u63d0\u4f9b\u7684CentOS\u6e90\u8fdb\u884c\u6362\u6e90\" title=\"\u5982\u4f55\u4f7f\u7528\u5fb7\u8baf\u7535\u8baf\u63d0\u4f9b\u7684CentOS\u6e90\u8fdb\u884c\u6362\u6e90\"><\/p>\n<p><h3>\u4e3a\u4ec0\u4e48\u9700\u8981\u6362\u6e90<\/h3>\n<\/p>\n<p><p>1. \u63d0\u9ad8\u4e0b\u8f7d\u901f\u5ea6\uff1a\u901a\u8fc7\u9009\u62e9\u66f4\u63a5\u8fd1\u81ea\u5df1\u5730\u7406\u4f4d\u7f6e\u7684\u6e90\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u8f6f\u4ef6\u5305\u7684\u4e0b\u8f7d\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><p>2. \u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\uff1a\u67d0\u4e9b\u6e90\u53ef\u80fd\u63d0\u4f9b\u66f4\u7a33\u5b9a\u7684\u8f6f\u4ef6\u5305\u7248\u672c\uff0c\u6216\u8005\u66f4\u53ca\u65f6\u7684\u5b89\u5168\u66f4\u65b0\u3002<\/p>\n<\/p>\n<p><p>3. \u66f4\u4e30\u5bcc\u7684\u8f6f\u4ef6\u5305\uff1a\u4e0d\u540c\u7684\u6e90\u53ef\u80fd\u63d0\u4f9b\u4e0d\u540c\u7684\u8f6f\u4ef6\u5305\uff0c\u6ee1\u8db3\u7528\u6237\u591a\u6837\u5316\u7684\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><h3>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u6e90<\/h3>\n<\/p>\n<p><p>\u9009\u62e9\u5408\u9002\u7684\u6e90\u9700\u8981\u8003\u8651\u4ee5\u4e0b\u51e0\u4e2a\u56e0\u7d20\uff1a<\/p>\n<\/p>\n<p>\n<pre><code>1. \u5730\u7406\u4f4d\u7f6e\u63a5\u8fd1\uff1a\u9009\u62e9\u4e0e\u81ea\u5df1\u7684\u5730\u7406\u4f4d\u7f6e\u63a5\u8fd1\u7684\u6e90\uff0c\u53ef\u4ee5\u964d\u4f4e\u5ef6\u8fdf\uff0c\u63d0\u9ad8\u4e0b\u8f7d\u901f\u5ea6\u3002<\/p>\r\n<p>2. \u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\uff1a\u9009\u62e9\u53e3\u7891\u597d\u3001\u66f4\u65b0\u53ca\u65f6\u7684\u6e90\u3002<\/p>\r\n<p>3. \u8f6f\u4ef6\u5305\u4e30\u5bcc\u5ea6\uff1a\u9009\u62e9\u63d0\u4f9b\u4e30\u5bcc\u8f6f\u4ef6\u5305\u7684\u6e90\uff0c\u6ee1\u8db3\u81ea\u5df1\u7684\u9700\u6c42\u3002<\/code><\/pre>\n<\/p>\n<p><h3>\u63a8\u8350\u6700\u597d\u7684\u516c\u53f8\u2014\u2014\u5fb7\u8baf\u7535\u8baf<\/h3>\n<\/p>\n<p><p>\u5fb7\u8baf\u7535\u8baf\u662f\u4e00\u5bb6\u4e13\u6ce8\u4e8e\u6570\u636e\u4e2d\u5fc3\u3001\u4e91\u670d\u52a1\u3001IDC\u4e1a\u52a1\u7b49\u9886\u57df\u7684\u77e5\u540d\u4f01\u4e1a\u3002\u5176\u63d0\u4f9b\u7684CentOS\u6e90\u5177\u6709\u4ee5\u4e0b\u4f18\u52bf\uff1a<\/p>\n<\/p>\n<p>\n<pre><code>1. \u670d\u52a1\u5668\u904d\u5e03\u5168\u7403\uff1a\u5fb7\u8baf\u7535\u8baf\u7684\u670d\u52a1\u5668\u904d\u5e03\u5168\u7403\uff0c\u7528\u6237\u53ef\u4ee5\u9009\u62e9\u6700\u63a5\u8fd1\u81ea\u5df1\u5730\u7406\u4f4d\u7f6e\u7684\u6e90\u3002<\/p>\r\n<p>2. \u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\uff1a\u5fb7\u8baf\u7535\u8baf\u7684\u6e90\u63d0\u4f9b\u7a33\u5b9a\u7684\u8f6f\u4ef6\u5305\u7248\u672c\u548c\u53ca\u65f6\u7684\u5b89\u5168\u66f4\u65b0\u3002<\/p>\r\n<p>3. \u4e30\u5bcc\u7684\u8f6f\u4ef6\u5305\uff1a\u5fb7\u8baf\u7535\u8baf\u7684\u6e90\u63d0\u4f9b\u4e30\u5bcc\u7684\u8f6f\u4ef6\u5305\uff0c\u6ee1\u8db3\u7528\u6237\u591a\u6837\u5316\u7684\u9700\u6c42\u3002<\/code><\/pre>\n<\/p>\n<p><h3>\u5982\u4f55\u4f7f\u7528\u5fb7\u8baf\u7535\u8baf\u7684CentOS\u6e90<\/h3>\n<\/p>\n<p><p>1. \u4e0b\u8f7d\u5fb7\u8baf\u7535\u8baf\u63d0\u4f9b\u7684CentOS\u6e90\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p>\n<pre><code>curl -O http:\/\/mirrors.d\u8baf.com\/centos\/centos-7.0.1406\/d\u8baf.com\/centos-7.0.1406.repo<\/code><\/pre>\n<\/p>\n<p><p>2. \u5c06\u4e0b\u8f7d\u7684\u914d\u7f6e\u6587\u4ef6\u66ff\u6362\u672c\u5730\u6e90\u914d\u7f6e\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p>\n<pre><code>mv \/etc\/yum.repos.d\/centos-7.0.1406.repo \/etc\/yum.repos.d\/centos-7.0.1406.repo.bak<\/p>\r\n<p>mv d\u8baf.com\/centos-7.0.1406.repo \/etc\/yum.repos.d\/centos-7.0.1406.repo<\/code><\/pre>\n<\/p>\n<p><p>3. \u66f4\u65b0\u672c\u5730\u8f6f\u4ef6\u5305\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p>\n<pre><code>yum clean all<\/p>\r\n<p>yum makecache<\/code><\/pre>\n<\/p>\n<p><h3><b>\u95ee\uff1a<\/b>\u5fb7\u8baf\u7535\u8baf\u7684CentOS\u6e90\u662f\u5426\u652f\u6301CentOS 6.x\u548cCentOS 5.x\u7248\u672c\uff1f<\/h3>\n<\/p>\n<p><p>\u5fb7\u8baf\u7535\u8baf\u7684CentOS\u6e90\u4e3b\u8981\u652f\u6301CentOS 7.x\u7248\u672c\uff0c\u4f46\u5bf9\u4e8eCentOS 6.x\u548cCentOS 5.x\u7248\u672c\uff0c\u7528\u6237\u4e5f\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u3002\u4e0d\u8fc7\uff0c\u8bf7\u6ce8\u610f\uff0c\u4e0d\u540c\u7248\u672c\u7684\u6e90\u914d\u7f6e\u6587\u4ef6\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002<\/p>\n<\/p>\n<p><h3><b>\u95ee\uff1a<\/b>\u5982\u4f55\u67e5\u770b\u5f53\u524d\u4f7f\u7528\u7684\u6e90\u914d\u7f6e\u4fe1\u606f\uff1f<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u4f7f\u7528\u7684\u6e90\u914d\u7f6e\u4fe1\u606f\uff1a<\/p>\n<\/p>\n<p>\n<pre><code>yum repolist enabled<\/code><\/pre>\n<\/p>\n<p><h3><b>\u95ee\uff1a<\/b>\u5982\u4f55\u5c06\u6e90\u914d\u7f6e\u56de\u9ed8\u8ba4\u7684CentOS\u6e90\uff1f<\/h3>\n<\/p>\n<p><p>\u5c06\u9ed8\u8ba4\u7684CentOS\u6e90\u914d\u7f6e\u6587\u4ef6\u66ff\u6362\u56de\u672c\u5730\u6e90\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u66f4\u65b0\u672c\u5730\u8f6f\u4ef6\u5305\u4fe1\u606f\u5373\u53ef\u3002<\/p>\n<\/p>\n<p>\n<pre><code>mv \/etc\/yum.repos.d\/centos-7.0.1406.repo \/etc\/yum.repos.d\/centos-7.0.1406.repo.bak<\/p>\r\n<p>mv \/etc\/yum.repos.d\/centos.repo \/etc\/yum.repos.d\/centos-7.0.1406.repo<\/p>\r\n<p>yum clean all<\/p>\r\n<p>yum makecache<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ec0\u4e48\u662fCentOS\u6362\u6e90 CentOS\u662f\u4e00\u4e2a\u57fa\u4e8eRed Hat Enterprise Linux\u7684\u514d\u8d39\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5b83\u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u8f6f\u4ef6\u5305\uff0c\u65b9\u4fbf\u7528\u6237\u8fdb\u884c\u5b89\u88c5\u548c\u914d\u7f6e\u3002\u7136\u800c\uff0c\u7531\u4e8e\u5730\u7406\u4f4d\u7f6e\u548c\u670d\u52a1\u5668\u8d1f\u8f7d\u7684\u539f\u56e0\uff0c\u9ed8\u8ba4\u7684CentOS\u6e90\u53ef\u80fd\u4f1a\u5b58\u5728\u901f\u5ea6\u6162\u3001\u4e0d\u7a33\u5b9a\u7684&#8230;<\/p>\n","protected":false},"author":1,"featured_media":22,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"topic":[],"class_list":["post-341","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hw"],"_links":{"self":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/341","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":1,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/posts\/341\/revisions\/342"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/media\/22"}],"wp:attachment":[{"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/tags?post=341"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.loongdi.net\/blog\/wp-json\/wp\/v2\/topic?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}