{"id":44916,"date":"2024-10-06T19:09:13","date_gmt":"2024-10-06T11:09:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/44916\/"},"modified":"2024-10-06T19:09:13","modified_gmt":"2024-10-06T11:09:13","slug":"linux-%e5%9f%ba%e7%a4%8e%e7%9f%a5%e8%ad%98%ef%bc%9acentos-%e7%84%a1%e6%b3%95%e4%bd%bf%e7%94%a8-epel-%e6%ba%90","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/44916\/","title":{"rendered":"Linux \u57fa\u790e\u77e5\u8b58\uff1aCentOS \u7121\u6cd5\u4f7f\u7528 EPEL \u6e90"},"content":{"rendered":"<h1 id=\"linux-%e5%9f%ba%e7%a4%8e%e7%9f%a5%e8%ad%98%ef%bc%9acentos-%e7%84%a1%e6%b3%95%e4%bd%bf%e7%94%a8-epel-%e6%ba%90-LejIVQUZKB\">Linux \u57fa\u790e\u77e5\u8b58\uff1aCentOS \u7121\u6cd5\u4f7f\u7528 EPEL \u6e90<\/h1>\n<p>\u5728\u4f7f\u7528 CentOS \u4f5c\u70ba\u4f3a\u670d\u5668\u64cd\u4f5c\u7cfb\u7d71\u6642\uff0c\u8a31\u591a\u7528\u6236\u6703\u5e0c\u671b\u80fd\u5920\u5b89\u88dd\u4f86\u81ea EPEL\uff08Extra Packages for Enterprise Linux\uff09\u6e90\u7684\u984d\u5916\u8edf\u9ad4\u5305\u3002EPEL \u662f\u7531 Fedora \u793e\u5340\u7dad\u8b77\u7684\u4e00\u500b\u9ad8\u54c1\u8cea\u8edf\u9ad4\u5305\u5eab\uff0c\u63d0\u4f9b\u4e86\u8a31\u591a CentOS \u9810\u8a2d\u6e90\u4e2d\u6c92\u6709\u7684\u61c9\u7528\u7a0b\u5f0f\u548c\u5de5\u5177\u3002\u7136\u800c\uff0c\u6709\u6642\u5019\u7528\u6236\u53ef\u80fd\u6703\u9047\u5230\u7121\u6cd5\u4f7f\u7528 EPEL \u6e90\u7684\u60c5\u6cc1\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u9019\u4e00\u554f\u984c\u7684\u539f\u56e0\u53ca\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-epel-%e6%ba%90%ef%bc%9f-LejIVQUZKB\">\u4ec0\u9ebc\u662f EPEL \u6e90\uff1f<\/h2>\n<p>EPEL \u662f\u4e00\u500b\u7531 Fedora \u793e\u5340\u63d0\u4f9b\u7684\u9644\u52a0\u8edf\u9ad4\u5305\u5eab\uff0c\u5c08\u70ba RHEL\uff08Red Hat Enterprise Linux\uff09\u53ca\u5176\u884d\u751f\u7248\u672c\uff08\u5982 CentOS\uff09\u8a2d\u8a08\u3002EPEL \u63d0\u4f9b\u4e86\u5927\u91cf\u7684\u958b\u6e90\u8edf\u9ad4\u5305\uff0c\u9019\u4e9b\u5305\u901a\u5e38\u662f\u7d93\u904e\u6e2c\u8a66\u4e14\u7a69\u5b9a\u7684\uff0c\u80fd\u5920\u6eff\u8db3\u7528\u6236\u7684\u5404\u7a2e\u9700\u6c42\u3002<\/p>\n<h2 id=\"%e7%82%ba%e4%bb%80%e9%ba%bc-centos-%e7%84%a1%e6%b3%95%e4%bd%bf%e7%94%a8-epel-%e6%ba%90%ef%bc%9f-LejIVQUZKB\">\u70ba\u4ec0\u9ebc CentOS \u7121\u6cd5\u4f7f\u7528 EPEL \u6e90\uff1f<\/h2>\n<p>\u7576\u7528\u6236\u5728 CentOS \u4e0a\u5617\u8a66\u555f\u7528 EPEL \u6e90\u6642\uff0c\u53ef\u80fd\u6703\u9047\u5230\u4ee5\u4e0b\u5e7e\u7a2e\u60c5\u6cc1\uff1a<\/p>\n<ul>\n<li><strong>\u7db2\u7d61\u554f\u984c\uff1a<\/strong>\u5982\u679c\u4f3a\u670d\u5668\u7121\u6cd5\u9023\u63a5\u5230 EPEL \u6e90\u7684\u4f3a\u670d\u5668\uff0c\u5247\u7121\u6cd5\u4e0b\u8f09\u76f8\u61c9\u7684\u8edf\u9ad4\u5305\u3002<\/li>\n<li><strong>\u7248\u672c\u4e0d\u517c\u5bb9\uff1a<\/strong>\u67d0\u4e9b CentOS \u7248\u672c\u53ef\u80fd\u4e0d\u518d\u652f\u6301\u7279\u5b9a\u7684 EPEL \u7248\u672c\uff0c\u5c0e\u81f4\u7121\u6cd5\u5b89\u88dd\u3002<\/li>\n<li><strong>\u5b89\u88dd\u904e\u7a0b\u4e2d\u7684\u932f\u8aa4\uff1a<\/strong>\u5728\u5b89\u88dd EPEL \u6e90\u6642\uff0c\u53ef\u80fd\u6703\u56e0\u70ba\u914d\u7f6e\u932f\u8aa4\u6216\u4f9d\u8cf4\u554f\u984c\u800c\u5c0e\u81f4\u5b89\u88dd\u5931\u6557\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e8%a7%a3%e6%b1%ba-centos-%e7%84%a1%e6%b3%95%e4%bd%bf%e7%94%a8-epel-%e6%ba%90%e7%9a%84%e5%95%8f%e9%a1%8c-LejIVQUZKB\">\u5982\u4f55\u89e3\u6c7a CentOS \u7121\u6cd5\u4f7f\u7528 EPEL \u6e90\u7684\u554f\u984c<\/h2>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u6c7a\u65b9\u6848\uff0c\u53ef\u4ee5\u5e6b\u52a9\u7528\u6236\u89e3\u6c7a\u7121\u6cd5\u4f7f\u7528 EPEL \u6e90\u7684\u554f\u984c\uff1a<\/p>\n<h3 id=\"1-%e7%a2%ba%e8%aa%8d%e7%b6%b2%e7%b5%a1%e9%80%a3%e6%8e%a5-LejIVQUZKB\">1. \u78ba\u8a8d\u7db2\u7d61\u9023\u63a5<\/h3>\n<p>\u9996\u5148\uff0c\u6aa2\u67e5\u4f3a\u670d\u5668\u7684\u7db2\u7d61\u9023\u63a5\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u6e2c\u8a66\u9023\u63a5\uff1a<\/p>\n<pre><code>ping epel.mirror.constant.com<\/code><\/pre>\n<p>\u5982\u679c\u7121\u6cd5 ping \u901a\uff0c\u5247\u9700\u8981\u6aa2\u67e5\u9632\u706b\u7246\u8a2d\u7f6e\u6216\u7db2\u7d61\u914d\u7f6e\u3002<\/p>\n<h3 id=\"2-%e5%ae%89%e8%a3%9d-epel-%e6%ba%90-LejIVQUZKB\">2. \u5b89\u88dd EPEL \u6e90<\/h3>\n<p>\u5982\u679c\u7db2\u7d61\u6b63\u5e38\uff0c\u5247\u53ef\u4ee5\u5617\u8a66\u91cd\u65b0\u5b89\u88dd EPEL \u6e90\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u4f86\u5b89\u88dd EPEL\uff1a<\/p>\n<pre><code>sudo yum install epel-release<\/code><\/pre>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u57f7\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u66f4\u65b0\u8edf\u9ad4\u5305\u5217\u8868\uff1a<\/p>\n<pre><code>sudo yum update<\/code><\/pre>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e7%89%88%e6%9c%ac%e5%85%bc%e5%ae%b9%e6%80%a7-LejIVQUZKB\">3. \u6aa2\u67e5\u7248\u672c\u517c\u5bb9\u6027<\/h3>\n<p>\u78ba\u4fdd\u60a8\u4f7f\u7528\u7684 CentOS \u7248\u672c\u8207 EPEL \u6e90\u517c\u5bb9\u3002\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5 CentOS \u7248\u672c\uff1a<\/p>\n<pre><code>cat \/etc\/centos-release<\/code><\/pre>\n<p>\u6839\u64da\u7248\u672c\uff0c\u8a2a\u554f EPEL \u7684\u5b98\u65b9\u7db2\u7ad9\u4ee5\u78ba\u8a8d\u652f\u6301\u7684\u7248\u672c\u3002<\/p>\n<h3 id=\"4-%e6%b8%85%e9%99%a4-yum-%e7%b7%a9%e5%ad%98-LejIVQUZKB\">4. \u6e05\u9664 Yum \u7de9\u5b58<\/h3>\n<p>\u6709\u6642\u5019\uff0cYum \u7684\u7de9\u5b58\u53ef\u80fd\u6703\u5c0e\u81f4\u554f\u984c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6e05\u9664\u7de9\u5b58\uff1a<\/p>\n<pre><code>sudo yum clean all<\/code><\/pre>\n<p>\u7136\u5f8c\u518d\u6b21\u5617\u8a66\u5b89\u88dd EPEL \u6e90\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-LejIVQUZKB\">\u7d50\u8ad6<\/h2>\n<p>\u5728 CentOS \u4e0a\u4f7f\u7528 EPEL \u6e90\u53ef\u4ee5\u5927\u5927\u64f4\u5c55\u53ef\u7528\u7684\u8edf\u9ad4\u5305\uff0c\u4f46\u6709\u6642\u5019\u7528\u6236\u53ef\u80fd\u6703\u9047\u5230\u7121\u6cd5\u4f7f\u7528\u7684\u60c5\u6cc1\u3002\u901a\u904e\u6aa2\u67e5\u7db2\u7d61\u9023\u63a5\u3001\u91cd\u65b0\u5b89\u88dd EPEL \u6e90\u3001\u78ba\u8a8d\u7248\u672c\u517c\u5bb9\u6027\u4ee5\u53ca\u6e05\u9664 Yum \u7de9\u5b58\uff0c\u901a\u5e38\u53ef\u4ee5\u89e3\u6c7a\u9019\u4e9b\u554f\u984c\u3002\u4e86\u89e3\u9019\u4e9b\u57fa\u672c\u77e5\u8b58\u5c07\u6709\u52a9\u65bc\u7528\u6236\u66f4\u6709\u6548\u5730\u7ba1\u7406\u5176\u4f3a\u670d\u5668\u3002<\/p>\n<p>\u5982\u9700\u9032\u4e00\u6b65\u4e86\u89e3\u6709\u95dc <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u53ca\u5176\u4ed6\u4f3a\u670d\u5668\u89e3\u6c7a\u65b9\u6848\u7684\u4fe1\u606f\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u89e3\u6c7a CentOS \u4e2d\u7121\u6cd5\u4f7f\u7528 EPEL \u6e90\u7684\u554f\u984c\uff0c\u638c\u63e1 Linux \u57fa\u790e\u77e5\u8b58\uff0c\u63d0\u5347\u7cfb\u7d71\u7ba1\u7406\u6280\u80fd\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-44916","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=44916"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44916\/revisions"}],"predecessor-version":[{"id":44917,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/44916\/revisions\/44917"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=44916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=44916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=44916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}