{"id":11585,"date":"2024-09-20T16:50:17","date_gmt":"2024-09-20T08:50:17","guid":{"rendered":"http:\/\/999.zuizhuai.cn\/?p=11585"},"modified":"2024-09-20T16:50:17","modified_gmt":"2024-09-20T08:50:17","slug":"centos7%e6%9b%b4%e6%8d%a2yum%e6%ba%90%ef%bc%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%e6%90%9e%e5%ae%9a%ef%bc%81","status":"publish","type":"post","link":"http:\/\/puo.cn\/?p=11585","title":{"rendered":"centos7\u66f4\u6362yum\u6e90\uff0c\u4e00\u6761\u547d\u4ee4\u641e\u5b9a\uff01"},"content":{"rendered":"<h3 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; font-size: 20px; line-height: 28px;\" data-lake-id=\"2894ebfc58f8bc24db1f4d3849964ea4\" data-spm-anchor-id=\"a2c6h.12873639.article-detail.i3.8c9b31ebLCNi8g\">\u66f4\u6362yum\u6e90\u7684\u547d\u4ee4<\/h3>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"1af45d4bc45b43371bc5081b6d95a9fd\" data-spm-anchor-id=\"a2c6h.12873639.article-detail.i0.8c9b31ebLCNi8g\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\" data-spm-anchor-id=\"a2c6h.12873639.article-detail.i2.8c9b31ebLCNi8g\">yum install -y wget &amp;&amp; mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup &amp;&amp; wget -O \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo &amp;&amp; yum clean all &amp;&amp; yum makecache<\/code><\/p>\n<hr style=\"border-style: solid; border-color: transparent; margin-top: 18px; margin-bottom: 18px;\" \/>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"dc5bcaad9cb718b5d1ffa764902b6d74\">\u8fd9\u6761\u547d\u4ee4\u6267\u884c\u5c31ok\u4e86\u3002\u5f53\u7136\u4e5f\u53ef\u4ee5\u5b89\u88c5\u4e0b\u9762\u7684\u6b65\u9aa4\uff0c\u5206\u6b65\u9aa4\u6267\u884c\u3002<\/p>\n<h3 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; font-size: 20px; line-height: 28px;\" data-lake-id=\"ecc6f38c3226914b02e9991b8c8a2600\">\u62c6\u89e3\u547d\u4ee4\u5e76\u89e3\u91ca<\/h3>\n<h4 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; line-height: 24px;\" data-lake-id=\"5d57251bf244eba8cc69564677ebb21f\">\u5fc5\u5907\u5de5\u5177<\/h4>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"228a63cbd0eb861c255f3a8edd652a92\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">yum install -y wget\u3000\u3000<\/code><\/p>\n<blockquote style=\"margin-top: 5px; margin-bottom: 5px; padding-left: 1em;\">\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em;\" data-lake-id=\"facb0a6ceecdcc406ca3961ceee6898f\">\u4f7f\u7528\u4e4b\u524d\u8bf7\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5wget\uff0c\u5982\u672a\u5b89\u88c5\u8bf7\u6267\u884c\u4e0b\u9762\u4e00\u6761\u547d\u4ee4\u6765\u5b89\u88c5<\/p>\n<\/blockquote>\n<h4 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; line-height: 24px;\" data-lake-id=\"f37ee39adbc1423dc6639be3f2c41a65\">\u5907\u4efd\u539f\u6765\u7684\u6e90<\/h4>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"52ce6a5a6183b3feed801684eef26509\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">sudo mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.bk<\/code><\/p>\n<h4 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; line-height: 24px;\" data-lake-id=\"96103650ab10779a10a82b9f3c29af17\">\u4e0b\u8f7d\u963f\u91cc\u6e90<\/h4>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"497b651b330d2dfd6311ee5f54c5d734\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">cd \/etc\/yum.repos.d<\/code><\/p>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"4f66d89d5476aa01cf1a8b32fbd7eda2\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">wget -nc http:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo<\/code><\/p>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"183955ffda5b4f3f10f23d4a610dbd97\">##\uff03\u66f4\u6539\u963f\u91ccyum\u6e90\u4e3a\u9ed8\u8ba4\u6e90<\/p>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"ad4aeabf2e8b0df8bf46ee9f2bc6a447\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">sudo mv Centos-7.repo CentOS-Base.repo<\/code><\/p>\n<h4 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; line-height: 24px;\" data-lake-id=\"64476f20fa46317863f8b16659e0345a\">\u66f4\u65b0\u672c\u5730yum\u7f13\u5b58<\/h4>\n<h5 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; font-size: 14px; line-height: 24px;\" data-lake-id=\"662e8074b5bcfd8e461c48c598491456\">\u5168\u90e8\u6e05\u9664<\/h5>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"0928d0554896d76f45b9cf2feddc83f0\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">sudo yum clean all<\/code><\/p>\n<h5 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; font-size: 14px; line-height: 24px;\" data-lake-id=\"74f6664f7adde6346712c91ce86c0f34\">\u66f4\u65b0\u5217\u8868<\/h5>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"35e09ee08aafb5ff3d27540c32cc02c6\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">sudo yum list<\/code><\/p>\n<h5 style=\"padding-top: 7px; padding-bottom: 7px; font-weight: bold; font-size: 14px; line-height: 24px;\" data-lake-id=\"90f86c13b3505212ba3a80f750f3ed87\">\u7f13\u5b58yum\u5305\u4fe1\u606f\u5230\u672c\u673a\uff0c\u63d0\u9ad8\u641c\u7d22\u901f\u5ea6<\/h5>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"48564f7c2184f611acc52b2d0c2c1a27\"><code style=\"font-size: inherit; padding-right: 2px; padding-left: 2px; border-width: 1px; border-style: solid; border-radius: 2px; line-height: inherit;\">sudo yum makecache<\/code><\/p>\n<hr style=\"border-style: solid; border-color: transparent; margin-top: 18px; margin-bottom: 18px;\" \/>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"c8759c1f2139f11491c91becd752df56\" data-spm-anchor-id=\"a2c6h.12873639.article-detail.i4.8c9b31ebLCNi8g\">\u5927\u529f\u544a\u6210!!<\/p>\n<p style=\"font-size: 14px; line-height: 1.74; letter-spacing: 0.05em; margin-bottom: 0px;\" data-lake-id=\"c8759c1f2139f11491c91becd752df56\" data-spm-anchor-id=\"a2c6h.12873639.article-detail.i4.8c9b31ebLCNi8g\">\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u66f4\u6362yum\u6e90\u7684\u547d\u4ee4 yum install -y wget &amp;&amp; mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup &#038;&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[128],"tags":[],"topic":[],"class_list":["post-11585","post","type-post","status-publish","format-standard","hentry","category-128"],"_links":{"self":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/11585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=11585"}],"version-history":[{"count":0,"href":"http:\/\/puo.cn\/index.php?rest_route=\/wp\/v2\/posts\/11585\/revisions"}],"wp:attachment":[{"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11585"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11585"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/puo.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftopic&post=11585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}