{"id":6728,"date":"2020-03-18T14:17:09","date_gmt":"2020-03-18T06:17:09","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=6728"},"modified":"2022-05-09T23:51:40","modified_gmt":"2022-05-09T15:51:40","slug":"yum","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/yum","title":{"rendered":"yum\u547d\u4ee4 – \u57fa\u4e8eRPM\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668"},"content":{"rendered":"\n

yum\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dYellowdogUpdater,Modified\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5728Linux\u7cfb\u7edf\u4e2d\u57fa\u4e8eRPM\u6280\u672f\u8fdb\u884c\u8f6f\u4ef6\u5305\u7684\u7ba1\u7406\u5de5\u4f5c\u3002yum\u6280\u672f\u901a\u7528\u4e8eRHEL\u3001CentOS\u3001Fedora\u3001OpenSUSE\u7b49\u4e3b\u6d41\u7cfb\u7edf\uff0c\u53ef\u4ee5\u8ba9\u7cfb\u7edf\u7ba1\u7406\u4eba\u5458\u4ea4\u4e92\u5f0f\u7684\u81ea\u52a8\u5316\u66f4\u65b0\u548c\u7ba1\u7406\u8f6f\u4ef6\u5305\uff0c\u5b9e\u73b0\u4ece\u6307\u5b9a\u670d\u52a1\u5668\u81ea\u52a8\u4e0b\u8f7d\u3001\u66f4\u65b0\u3001\u5220\u9664\u8f6f\u4ef6\u5305\u7684\u5de5\u4f5c\u3002<\/p>\n\n\n\n

yum\u8f6f\u4ef6\u4ed3\u5e93\u53ca\u547d\u4ee4\u80fd\u591f\u81ea\u52a8\u5904\u7406\u8f6f\u4ef6\u4f9d\u8d56\u5173\u7cfb\uff0c\u4e00\u6b21\u6027\u5b89\u88c5\u6240\u9700\u5168\u90e8\u8f6f\u4ef6\uff0c\u65e0\u9700\u7e41\u7410\u7684\u64cd\u4f5c\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>yum [\u53c2\u6570] \u8f6f\u4ef6\u5305<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-h<\/td>\u663e\u793a\u5e2e\u52a9\u4fe1\u606f<\/td><\/tr>
-y<\/td>\u5bf9\u6240\u6709\u7684\u63d0\u95ee\u90fd\u56de\u7b54\u201cyes\u201d<\/td><\/tr>
-c<\/td>\u6307\u5b9a\u914d\u7f6e\u6587\u4ef6<\/td><\/tr>
-q<\/td>\u5b89\u9759\u6a21\u5f0f<\/td><\/tr>
-v<\/td>\u8be6\u7ec6\u6a21\u5f0f<\/td><\/tr>
-t<\/td>\u68c0\u67e5\u5916\u90e8\u9519\u8bef<\/td><\/tr>
-d<\/td>\u8bbe\u7f6e\u8c03\u8bd5\u7b49\u7ea7\uff080-10\uff09<\/td><\/tr>
-e<\/td>\u8bbe\u7f6e\u9519\u8bef\u7b49\u7ea7\uff080-10\uff09<\/td><\/tr>
-R<\/td>\u8bbe\u7f6eyum\u5904\u7406\u4e00\u4e2a\u547d\u4ee4\u7684\u6700\u5927\u7b49\u5f85\u65f6\u95f4<\/td><\/tr>
-C<\/td>\u5b8c\u5168\u4ece\u7f13\u5b58\u4e2d\u8fd0\u884c\uff0c\u800c\u4e0d\u53bb\u4e0b\u8f7d\u6216\u8005\u66f4\u65b0\u4efb\u4f55\u5934\u6587\u4ef6<\/td><\/tr>
install<\/td>\u5b89\u88c5rpm\u8f6f\u4ef6\u5305<\/td><\/tr>
update<\/td>\u66f4\u65b0rpm\u8f6f\u4ef6\u5305<\/td><\/tr>
check-update<\/td>\u68c0\u67e5\u662f\u5426\u6709\u53ef\u7528\u7684\u66f4\u65b0rpm\u8f6f\u4ef6\u5305<\/td><\/tr>
remove<\/td>\u5220\u9664\u6307\u5b9a\u7684rpm\u8f6f\u4ef6\u5305<\/td><\/tr>
list<\/td>\u663e\u793a\u8f6f\u4ef6\u5305\u7684\u4fe1\u606f<\/td><\/tr>
search<\/td>\u68c0\u67e5\u8f6f\u4ef6\u5305\u7684\u4fe1\u606f<\/td><\/tr>
info<\/td>\u663e\u793a\u6307\u5b9a\u7684rpm\u8f6f\u4ef6\u5305\u7684\u63cf\u8ff0\u4fe1\u606f\u548c\u6982\u8981\u4fe1\u606f<\/td><\/tr>
clean<\/td>\u6e05\u7406yum\u8fc7\u671f\u7684\u7f13\u5b58<\/td><\/tr>
shell<\/td>\u8fdb\u5165yum\u7684shell\u63d0\u793a\u7b26<\/td><\/tr>
resolvedep<\/td>\u663e\u793arpm\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb<\/td><\/tr>
localinstall<\/td>\u5b89\u88c5\u672c\u5730\u7684rpm\u8f6f\u4ef6\u5305<\/td><\/tr>
localupdate<\/td>\u663e\u793a\u672c\u5730rpm\u8f6f\u4ef6\u5305\u8fdb\u884c\u66f4\u65b0<\/td><\/tr>
deplist<\/td>\u663e\u793arpm\u8f6f\u4ef6\u5305\u7684\u6240\u6709\u4f9d\u8d56\u5173\u7cfb<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u6e05\u7406\u539f\u6709\u7684\u8f6f\u4ef6\u4ed3\u5e93\u4fe1\u606f\u7f13\u5b58\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum clean all<\/strong>\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\n12 files removed\r<\/pre>\n\n\n\n

\u5efa\u7acb\u6700\u65b0\u7684\u8f6f\u4ef6\u4ed3\u5e93\u4fe1\u606f\u7f13\u5b58\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum makecache<\/strong>\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nAppStream                                        83 MB\/s | 5.3 MB     00:00    \r\nBaseOS                                           28 MB\/s | 2.2 MB     00:00    \r\nLast metadata expiration check: 0:00:01 ago on Mon 09 May 2022 11:43:41 PM CST.\r\nMetadata cache created.\r<\/pre>\n\n\n\n

\u5b89\u88c5\u6307\u5b9a\u7684\u670d\u52a1\u53ca\u76f8\u5173\u8f6f\u4ef6\u5305\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum install httpd<\/strong>\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026\r<\/pre>\n\n\n\n

\u66f4\u65b0\u6307\u5b9a\u7684\u670d\u52a1\u53ca\u76f8\u5173\u8f6f\u4ef6\u5305\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum update httpd<\/strong>\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n

\u5378\u8f7d\u6307\u5b9a\u7684\u670d\u52a1\u53ca\u76f8\u5173\u8f6f\u4ef6\u5305\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum remove httpd<\/strong>\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n

\u663e\u793a\u53ef\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u7ec4\u5217\u8868\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum grouplist <\/strong>\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\r\nLast metadata expiration check: 0:03:02 ago on Mon 09 May 2022 11:43:41 PM CST.\r\nAvailable Environment Groups:\r\n   Server\r\n   Minimal Install\r\n   Workstation\r\n   Virtualization Host\r\n   Custom Operating System\r\nInstalled Environment Groups:\r\n   Server with GUI\r\nInstalled Groups:\r\n   Container Management\r\n   Headless Management\r\nAvailable Groups:\r\n   .NET Core Development\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\n\n\n

\u663e\u793a\u6307\u5b9a\u670d\u52a1\u7684\u8f6f\u4ef6\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# yum info httpd<\/strong>\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nLast metadata expiration check: 0:07:21 ago on Mon 09 May 2022 11:43:41 PM CST.\nInstalled Packages\r\nName         : httpd\r\nVersion      : 2.4.37\r\nRelease      : 10.module+el8+2764+7127e69e\r\nArch         : x86_64\r\nSize         : 4.3 M\r\nSource       : httpd-2.4.37-10.module+el8+2764+7127e69e.src.rpm\r\nRepo         : @System\r\nFrom repo    : AppStream\r\nSummary      : Apache HTTP Server\r\nURL          : https:\/\/httpd.apache.org\/\r\nLicense      : ASL 2.0\r\nDescription  : The Apache HTTP Server is a powerful, efficient, and extensible\r\n             : web server.\r<\/pre>\n","protected":false},"excerpt":{"rendered":"

yum\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201dYellowdogUpdater,Modified\u201c\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5728Linux […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6728"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=6728"}],"version-history":[{"count":10,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6728\/revisions"}],"predecessor-version":[{"id":9416,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/6728\/revisions\/9416"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=6728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=6728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=6728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}