{"id":784,"date":"2021-07-16T00:10:30","date_gmt":"2021-07-15T16:10:30","guid":{"rendered":"https:\/\/www.dd-home.top\/?p=784"},"modified":"2021-07-17T22:56:33","modified_gmt":"2021-07-17T14:56:33","slug":"centsos-%e6%9b%b4%e6%8d%a2%e8%bd%af%e4%bb%b6%e6%ba%90","status":"publish","type":"post","link":"https:\/\/www.dd-home.top\/?p=784","title":{"rendered":"Centsos \u66f4\u6362\u8f6f\u4ef6\u6e90"},"content":{"rendered":"<h3><span style=\"font-size: 12pt;\">\u963f\u91cc\u4e91 \u955c\u50cf\u5730\u5740 https:\/\/developer.aliyun.com\/mirror\/<\/span><\/h3>\n<h3><span style=\"font-size: 12pt;\"><!--more--><\/span><\/h3>\n<h3 class=\"md-end-block md-heading\"><span class=\"md-plain\" style=\"font-size: 12pt;\">1. \u5907\u4efd<\/span><\/h3>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup<\/span><\/pre>\n<h3 class=\"md-end-block md-heading\"><span class=\"md-plain\" style=\"font-size: 12pt;\">2. \u4e0b\u8f7d\u65b0\u7684 CentOS-Base.repo \u5230 \/etc\/yum.repos.d\/<\/span><\/h3>\n<p class=\"md-end-block md-p md-focus\"><span class=\"md-pair-s md-expand\" style=\"font-size: 12pt;\"><strong><span class=\"md-plain\">CentOS 6<\/span><\/strong><\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">wget -O \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-6.repo<\/span><\/pre>\n<p class=\"md-end-block md-p\"><span class=\"md-plain\" style=\"font-size: 12pt;\">\u6216\u8005<\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">curl -o \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-6.repo<\/span><\/pre>\n<p class=\"md-end-block md-p\"><span class=\"md-pair-s \" style=\"font-size: 12pt;\"><strong><span class=\"md-plain\">CentOS 7<\/span><\/strong><\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">wget -O \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo<\/span><\/pre>\n<p class=\"md-end-block md-p\"><span class=\"md-plain\" style=\"font-size: 12pt;\">\u6216\u8005<\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">curl -o \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo<\/span><\/pre>\n<p class=\"md-end-block md-p\"><span class=\"md-pair-s \" style=\"font-size: 12pt;\"><strong><span class=\"md-plain\">CentOS 8<\/span><\/strong><\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">wget -O \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-8.repo<\/span><\/pre>\n<p class=\"md-end-block md-p\"><span class=\"md-plain\" style=\"font-size: 12pt;\">\u6216\u8005<\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm modeLoaded\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">curl -o \/etc\/yum.repos.d\/CentOS-Base.repo https:\/\/mirrors.aliyun.com\/repo\/Centos-8.repo<\/span><\/pre>\n<h3 class=\"md-end-block md-heading\"><span class=\"md-plain\" style=\"font-size: 12pt;\">3. \u8fd0\u884c yum makecache \u751f\u6210\u7f13\u5b58<\/span><\/h3>\n<h3 class=\"md-end-block md-heading\"><span class=\"md-plain\" style=\"font-size: 12pt;\">4. \u5176\u4ed6<\/span><\/h3>\n<p class=\"md-end-block md-p\"><span class=\"md-plain\" style=\"font-size: 12pt;\">\u975e\u963f\u91cc\u4e91ECS\u7528\u6237\u4f1a\u51fa\u73b0 Couldn&#8217;t resolve host &#8216;mirrors.cloud.aliyuncs.com&#8217; \u4fe1\u606f\uff0c\u4e0d\u5f71\u54cd\u4f7f\u7528\u3002\u7528\u6237\u4e5f\u53ef\u81ea\u884c\u4fee\u6539\u76f8\u5173\u914d\u7f6e: eg:<\/span><\/p>\n<pre class=\"md-fences md-end-block ty-contain-cm\" lang=\"\" spellcheck=\"false\"><span style=\"font-size: 12pt;\" role=\"presentation\">sed -i -e '\/mirrors.cloud.aliyuncs.com\/d' -e '\/mirrors.aliyuncs.com\/d' \/etc\/yum.repos.d\/CentO<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u963f\u91cc\u4e91 \u955c\u50cf\u5730\u5740 https:\/\/developer.aliyun.com\/mirror\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-784","post","type-post","status-publish","format-standard","hentry","category-5"],"_links":{"self":[{"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/posts\/784","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=784"}],"version-history":[{"count":3,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/posts\/784\/revisions"}],"predecessor-version":[{"id":823,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=\/wp\/v2\/posts\/784\/revisions\/823"}],"wp:attachment":[{"href":"https:\/\/www.dd-home.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=784"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=784"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dd-home.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=784"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}