{"id":63804,"date":"2025-04-29T12:43:03","date_gmt":"2025-04-29T04:43:03","guid":{"rendered":"https:\/\/fwq.ai\/blog\/63804\/"},"modified":"2025-04-29T12:43:03","modified_gmt":"2025-04-29T04:43:03","slug":"docker%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85yum-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/63804\/","title":{"rendered":"docker\u600e\u4e48\u5b89\u88c5yum"},"content":{"rendered":"<blockquote><p>\n  \u5728 docker \u5bb9\u5668\u4e2d\u5b89\u88c5 yum\uff1a\u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668\uff1b\u66f4\u65b0\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1b\u5b89\u88c5 yum\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/05\/2024060508511965638.jpg\" class=\"aligncenter\" title=\"docker\u600e\u4e48\u5b89\u88c5yum\u63d2\u56fe\" alt=\"docker\u600e\u4e48\u5b89\u88c5yum\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 Docker \u5bb9\u5668\u4e2d\u5b89\u88c5 YUM<\/strong><\/p>\n<p>YUM\uff08Yellowdog Updater, Managed\uff09\u662f\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406 RPM \u8f6f\u4ef6\u5305\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 Docker \u5bb9\u5668\u4e2d\u5b89\u88c5 YUM\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668<\/strong><\/p>\n<pre>docker run -it --rm centos:latest<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u66f4\u65b0\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f<\/strong><\/p>\n<pre>yum update<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6b65\u9aa4 3\uff1a\u5b89\u88c5 YUM<\/strong><\/p>\n<pre>yum install yum<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528  run \u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u57fa\u4e8e CentOS \u955c\u50cf\u7684\u5bb9\u5668\u3002<\/li>\n<li>-it \u6807\u5fd7\u542f\u7528\u4ea4\u4e92\u5f0f\u7ec8\u7aef\u3002<\/li>\n<li>&#8211;rm \u6807\u5fd7\u5728\u5bb9\u5668\u9000\u51fa\u540e\u81ea\u52a8\u5220\u9664\u8be5\u5bb9\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u66f4\u65b0\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd0\u884c yum update \u547d\u4ee4\u66f4\u65b0\u5bb9\u5668\u4e2d\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u3002\u8fd9\u5c06\u83b7\u53d6\u6240\u6709\u53ef\u7528\u66f4\u65b0\u7684\u5217\u8868\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5 YUM\uff1a<\/strong><\/p>\n<ul>\n<li>\u8fd0\u884c yum install yum \u547d\u4ee4\u5b89\u88c5 YUM\u3002\u8fd9\u5c06\u5b89\u88c5 YUM \u5957\u4ef6\u4ee5\u53ca\u6240\u6709\u5fc5\u9700\u7684\u4f9d\u8d56\u9879\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u5c31\u53ef\u4ee5\u5728\u5bb9\u5668\u4e2d\u4f7f\u7528 YUM \u6765\u7ba1\u7406\u8f6f\u4ef6\u5305\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u3001\u66f4\u65b0\u6216\u5220\u9664 RPM \u8f6f\u4ef6\u5305\uff1a<\/p>\n<ul>\n<li>\u5b89\u88c5\uff1ayum install <\/li>\n<li>\u66f4\u65b0\uff1ayum update <\/li>\n<li>\u5220\u9664\uff1ayum remove <\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u5b89\u88c5yum\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>\u5728 docker \u5bb9\u5668\u4e2d\u5b89\u88c5 yum\uff1a\u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668\uff1b\u66f4\u65b0\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1b\u5b89\u88c5 yum\u3002 \u5982\u4f55\u5728 Docker \u5bb9\u5668\u4e2d\u5b89\u88c5 YUM YUM\uff08Yellowdog Updater, Managed\uff09\u662f\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406 RPM \u8f6f\u4ef6\u5305\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 Docker \u5bb9\u5668\u4e2d\u5b89\u88c5 YUM\uff1a \u6b65\u9aa4 1\uff1a\u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668 docker run -it &#8211;rm centos:latest \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 2\uff1a\u66f4\u65b0\u5bb9\u5668\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f yum update \u767b\u5f55\u540e\u590d\u5236 \u6b65\u9aa4 3\uff1a\u5b89\u88c5 YUM yum install yum \u767b\u5f55\u540e\u590d\u5236 \u8be6\u7ec6\u6b65\u9aa4\uff1a \u4ece\u57fa\u7840\u955c\u50cf\u521b\u5efa\u5bb9\u5668\uff1a \u4f7f\u7528 run \u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u57fa\u4e8e CentOS \u955c\u50cf\u7684\u5bb9\u5668\u3002 -it \u6807\u5fd7\u542f\u7528\u4ea4\u4e92\u5f0f\u7ec8\u7aef\u3002 &#8211;rm \u6807\u5fd7\u5728\u5bb9\u5668\u9000\u51fa\u540e\u81ea\u52a8\u5220\u9664\u8be5\u5bb9\u5668\u3002 \u66f4\u65b0\u8f6f\u4ef6\u5305\u4fe1\u606f\uff1a \u8fd0\u884c yum update \u547d\u4ee4\u66f4\u65b0\u5bb9\u5668\u4e2d\u7684\u8f6f\u4ef6\u5305\u4fe1\u606f\u3002\u8fd9\u5c06\u83b7\u53d6\u6240\u6709\u53ef\u7528\u66f4\u65b0\u7684\u5217\u8868\u3002 \u5b89\u88c5 YUM\uff1a [&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-63804","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63804","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=63804"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/63804\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=63804"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=63804"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=63804"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}