{"id":63653,"date":"2025-04-29T10:21:21","date_gmt":"2025-04-29T02:21:21","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63653\/"},"modified":"2025-04-29T10:21:21","modified_gmt":"2025-04-29T02:21:21","slug":"linux%e6%80%8e%e4%b9%88%e4%bd%bf%e7%94%a8yum-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63653\/","title":{"rendered":"linux\u600e\u4e48\u4f7f\u7528yum"},"content":{"rendered":"<blockquote><p>\n  yum \u662f\u57fa\u4e8e red hat \u548c centos \u7684 linux \u53d1\u884c\u7248\u4e2d\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u8f6f\u4ef6\u5305\u3002\u4f7f\u7528 yum \u7ba1\u7406\u8f6f\u4ef6\u5305\u62ec\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 yum\uff08\u5982\u679c\u5c1a\u672a\u5b89\u88c5\uff09\u67e5\u627e\u8f6f\u4ef6\u5305\uff08sudo yum search \uff09\u5b89\u88c5\u8f6f\u4ef6\u5305\uff08sudo yum install \uff09\u66f4\u65b0\u8f6f\u4ef6\u5305\uff08sudo yum update\uff09\u5220\u9664\u8f6f\u4ef6\u5305\uff08sudo yum remove \uff09\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/04\/2024060409151977179.jpg\" class=\"aligncenter\" title=\"linux\u600e\u4e48\u4f7f\u7528yum\u63d2\u56fe\" alt=\"linux\u600e\u4e48\u4f7f\u7528yum\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4f7f\u7528 Yum \u5728 Linux \u4e2d\u7ba1\u7406\u8f6f\u4ef6<\/strong><\/p>\n<p><strong>\u4ec0\u4e48\u662f Yum\uff1f<\/strong><br \/>Yum\uff08\u5168\u79f0 Yellowdog Updater, Modified\uff09\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u5728\u57fa\u4e8e Red Hat \u548c CentOS \u7684 Linux \u53d1\u884c\u7248\u4e2d\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u8f6f\u4ef6\u5305\u3002\u5b83\u4f7f\u7528\u5305\u7ba1\u7406\u7cfb\u7edf\uff08RPM\uff09\u7684\u5143\u6570\u636e\u6765\u7ba1\u7406\u8f6f\u4ef6\u5305\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528 Yum\uff1f<\/strong><\/p>\n<p><strong>1. \u5b89\u88c5 Yum<\/strong><br \/>\u5982\u679c\u5c1a\u672a\u5b89\u88c5 Yum\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u5b83\uff1a<\/p>\n<pre>sudo yum install yum<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u67e5\u627e\u8f6f\u4ef6\u5305<\/strong><br \/>\u8981\u67e5\u627e\u7279\u5b9a\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum search &lt;\u8f6f\u4ef6\u5305\u540d\u79f0&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u67e5\u627e\u201chttpd\u201d\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo yum search httpd<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u5b89\u88c5\u8f6f\u4ef6\u5305<\/strong><br \/>\u8981\u5b89\u88c5\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum install &lt;\u8f6f\u4ef6\u5305\u540d\u79f0&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u5b89\u88c5\u201chttpd\u201d\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo yum install httpd<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>4. \u66f4\u65b0\u8f6f\u4ef6\u5305<\/strong><br \/>\u8981\u66f4\u65b0\u6240\u6709\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum update<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8981\u66f4\u65b0\u7279\u5b9a\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum update &lt;\u8f6f\u4ef6\u5305\u540d\u79f0&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>5. \u5220\u9664\u8f6f\u4ef6\u5305<\/strong><br \/>\u8981\u5220\u9664\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>sudo yum remove &lt;\u8f6f\u4ef6\u5305\u540d\u79f0&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u8981\u5220\u9664\u201chttpd\u201d\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>sudo yum remove httpd<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u5176\u4ed6\u5e38\u7528 Yum \u547d\u4ee4\uff1a<\/strong><\/p>\n<ul>\n<li>sudo yum list\uff1a\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<\/li>\n<li>sudo yum info \uff1a\u663e\u793a\u6709\u5173\u7279\u5b9a\u8f6f\u4ef6\u5305\u7684\u4fe1\u606f<\/li>\n<li>sudo yum check-update\uff1a\u68c0\u67e5\u662f\u5426\u6709\u53ef\u7528\u7684\u8f6f\u4ef6\u5305\u66f4\u65b0<\/li>\n<li>sudo yum clean all\uff1a\u6e05\u9664\u6240\u6709\u7f13\u5b58\u6587\u4ef6<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u4f7f\u7528yum\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>yum \u662f\u57fa\u4e8e red hat \u548c centos \u7684 linux \u53d1\u884c\u7248\u4e2d\u7684\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u8f6f\u4ef6\u5305\u3002\u4f7f\u7528 yum \u7ba1\u7406\u8f6f\u4ef6\u5305\u62ec\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u5b89\u88c5 yum\uff08\u5982\u679c\u5c1a\u672a\u5b89\u88c5\uff09\u67e5\u627e\u8f6f\u4ef6\u5305\uff08sudo yum search \uff09\u5b89\u88c5\u8f6f\u4ef6\u5305\uff08sudo yum install \uff09\u66f4\u65b0\u8f6f\u4ef6\u5305\uff08sudo yum update\uff09\u5220\u9664\u8f6f\u4ef6\u5305\uff08sudo yum remove \uff09 \u4f7f\u7528 Yum \u5728 Linux \u4e2d\u7ba1\u7406\u8f6f\u4ef6 \u4ec0\u4e48\u662f Yum\uff1fYum\uff08\u5168\u79f0 Yellowdog Updater, Modified\uff09\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u7528\u4e8e\u5728\u57fa\u4e8e Red Hat \u548c CentOS \u7684 Linux \u53d1\u884c\u7248\u4e2d\u5b89\u88c5\u3001\u66f4\u65b0\u548c\u5220\u9664\u8f6f\u4ef6\u5305\u3002\u5b83\u4f7f\u7528\u5305\u7ba1\u7406\u7cfb\u7edf\uff08RPM\uff09\u7684\u5143\u6570\u636e\u6765\u7ba1\u7406\u8f6f\u4ef6\u5305\u3002 \u5982\u4f55\u4f7f\u7528 Yum\uff1f 1. \u5b89\u88c5 Yum\u5982\u679c\u5c1a\u672a\u5b89\u88c5 Yum\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u5b83\uff1a sudo yum install yum \u767b\u5f55\u540e\u590d\u5236 2. \u67e5\u627e\u8f6f\u4ef6\u5305\u8981\u67e5\u627e\u7279\u5b9a\u8f6f\u4ef6\u5305\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a sudo yum [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-63653","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=63653"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63653\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}