{"id":99,"date":"2025-08-12T20:41:49","date_gmt":"2025-08-12T12:41:49","guid":{"rendered":"https:\/\/www.mooloco.com\/?p=99"},"modified":"2025-10-10T11:40:49","modified_gmt":"2025-10-10T03:40:49","slug":"red-hat%e7%b3%bb%e5%88%97%e7%9a%84%e5%8c%85%e7%ae%a1%e7%90%86%e5%99%a8%e9%99%84%ef%bc%9a%e6%ba%90%e4%bb%a3%e7%a0%81%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.mooloco.com\/?p=99","title":{"rendered":"Red Hat\u7cfb\u5217\u7684\u5305\u7ba1\u7406\u5668(\u9644\uff1a\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5)"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_75 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.mooloco.com\/?p=99\/#RPM%EF%BC%88Red_Hat_Package_Manager%EF%BC%89\" >RPM\uff08Red Hat Package Manager\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.mooloco.com\/?p=99\/#YUM%EF%BC%88Yellowdog_Updater_Modified%EF%BC%89\" >YUM\uff08Yellowdog Updater Modified\uff09<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.mooloco.com\/?p=99\/#RPM\" >RPM<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E6%9F%A5%E7%9C%8B%E5%B7%B2%E7%BB%8F%E5%AE%89%E8%A3%85%E7%9A%84%E4%BF%A1%E6%81%AF\" >\u67e5\u770b\u5df2\u7ecf\u5b89\u88c5\u7684\u4fe1\u606f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E6%9F%A5%E8%AF%A2%E6%9C%AA%E5%AE%89%E8%A3%85%E7%9A%84_RPM_%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%96%87%E4%BB%B6%E4%B8%AD%E4%BF%A1%E6%81%AF\" >\u67e5\u8be2\u672a\u5b89\u88c5\u7684 RPM \u8f6f\u4ef6\u5305\u6587\u4ef6\u4e2d\u4fe1\u606f<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E5%AE%89%E8%A3%85%E3%80%81%E5%8D%87%E7%BA%A7%E3%80%81%E5%8D%B8%E8%BD%BD_RPM_%E8%BD%AF%E4%BB%B6%E5%8C%85\" >\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d RPM \u8f6f\u4ef6\u5305<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.mooloco.com\/?p=99\/#YUM\" >YUM<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.mooloco.com\/?p=99\/#repo%E6%96%87%E4%BB%B6%E7%A4%BA%E4%BE%8B\" >repo\u6587\u4ef6\u793a\u4f8b<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.mooloco.com\/?p=99\/#yum%E5%B8%B8%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E5%91%BD%E4%BB%A4\" >yum\u5e38\u7528\u7684\u64cd\u4f5c\u547d\u4ee4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E5%9C%A8%E7%BA%BFrepo%E6%BA%90\" >\u5728\u7ebfrepo\u6e90<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E6%BA%90%E4%BB%A3%E7%A0%81%E5%AE%89%E8%A3%85\" >\u6e90\u4ee3\u7801\u5b89\u88c5<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%E9%A2%84%E8%A3%85\" >\u5f00\u53d1\u5de5\u5177\u9884\u88c5<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.mooloco.com\/?p=99\/#%E7%BB%93%E8%AF%AD\" >\u7ed3\u8bed<\/a><\/li><\/ul><\/nav><\/div>\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"RPM%EF%BC%88Red_Hat_Package_Manager%EF%BC%89\"><\/span>RPM\uff08Red Hat Package Manager\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9a\u4e49<\/strong>\uff1aRPM \u662f\u4e00\u79cd\u8f6f\u4ef6\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u4e3b\u8981\u7528\u4e8e\u57fa\u4e8e Red Hat \u7684 Linux \u53d1\u884c\u7248\uff08\u5982 RHEL\u3001CentOS\u3001Fedora\uff09\u5b89\u88c5\u3001\u5378\u8f7d\u3001\u5347\u7ea7\u548c\u67e5\u8be2\u8f6f\u4ef6\u5305\u3002<\/li>\n\n\n\n<li><strong>\u529f\u80fd<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>\u5b89\u88c5 <code>.rpm<\/code> \u683c\u5f0f\u7684\u8f6f\u4ef6\u5305\u3002<\/li>\n\n\n\n<li>\u5378\u8f7d\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002<\/li>\n\n\n\n<li>\u67e5\u8be2\u8f6f\u4ef6\u5305\u4fe1\u606f\uff08\u6bd4\u5982\u7248\u672c\u3001\u6587\u4ef6\u5217\u8868\u7b49\uff09\u3002<\/li>\n\n\n\n<li>\u9a8c\u8bc1\u8f6f\u4ef6\u5305\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u7279\u70b9<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>\u53ea\u5904\u7406\u5355\u4e2a\u8f6f\u4ef6\u5305\uff0c\u4e0d\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\u3002<\/li>\n\n\n\n<li>\u9700\u8981\u7528\u6237\u81ea\u5df1\u89e3\u51b3\u4f9d\u8d56\u95ee\u9898\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"YUM%EF%BC%88Yellowdog_Updater_Modified%EF%BC%89\"><\/span>YUM\uff08Yellowdog Updater Modified\uff09<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5b9a\u4e49<\/strong>\uff1aYUM \u662f\u57fa\u4e8e RPM \u7684\u9ad8\u7ea7\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u80fd\u81ea\u52a8\u5904\u7406\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u7b80\u5316\u8f6f\u4ef6\u5b89\u88c5\u548c\u7ba1\u7406\u3002<\/li>\n\n\n\n<li><strong>\u529f\u80fd<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>\u81ea\u52a8\u89e3\u51b3\u548c\u5b89\u88c5\u4f9d\u8d56\u5305\u3002<\/li>\n\n\n\n<li>\u4ece\u8f6f\u4ef6\u4ed3\u5e93\uff08Repository\uff09\u4e2d\u4e0b\u8f7d\u5b89\u88c5\u8f6f\u4ef6\u3002<\/li>\n\n\n\n<li>\u652f\u6301\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d\u8f6f\u4ef6\u5305\u3002<\/li>\n\n\n\n<li>\u652f\u6301\u4ed3\u5e93\u7ba1\u7406\u548c\u641c\u7d22\u8f6f\u4ef6\u5305\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u7279\u70b9<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>\u4f9d\u8d56\u81ea\u52a8\u5904\u7406\uff0c\u7528\u6237\u64cd\u4f5c\u66f4\u65b9\u4fbf\u3002<\/li>\n\n\n\n<li>\u652f\u6301\u8fdc\u7a0b\u4ed3\u5e93\uff0c\u65b9\u4fbf\u66f4\u65b0\u548c\u5b89\u88c5\u3002<\/li>\n\n\n\n<li>\u6bd4 rpm \u66f4\u667a\u80fd\u3001\u6613\u7528\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"RPM\"><\/span>RPM<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u4f7f\u7528 RPM \u673a\u5236\u5c01\u88c5\u7684\u8f6f\u4ef6\u5305\u6587\u4ef6\u62e5\u6709\u7ea6\u5b9a\u4fd7\u6210\u7684\u547d\u540d\u683c\u5f0f\u3002<br>\u4e00\u822c\u4f7f\u7528\u201c\u8f6f\u4ef6\u540d-\u8f6f\u4ef6\u7248 \u672c &#8211; \u53d1 \u5e03 \u6b21 \u6570 . \u64cd \u4f5c \u7cfb \u7edf \u7c7b \u578b . \u786c \u4ef6 \u67b6 \u6784 \u7c7b \u578b .rpm\u201d \u7684 \u6587 \u4ef6 \u540d \u5f62 \u5f0f \uff0c \u5982 \u201cbash-4.2.46-20.el7_2.x86_64.rpm\u201d\u3002<\/em><br><em>\u5176\u4e2d\u786c\u4ef6\u5e73\u53f0\u901a\u5e38\u4e3a\u201ci386\u201d\u6216\u201ci686\u201d\u7b49\uff0c\u8868\u793a\u9002\u7528\u4e8e Intel \u516c\u53f8\u7684\u5904\u7406\u5668\uff0c\u201cx86_64\u201d\u8868\u793a\u9002\u7528\u4e8e 64 \u4f4d\u7684\u7cfb\u7edf\uff0c\u5982\u679c\u662f\u201cnoarch\u201d\u8868\u793a\u4e0d\u533a\u5206\u786c\u4ef6\u67b6 \u6784\uff08\u652f\u6301\u4e0d\u540c\u786c\u4ef6\u4f53\u7cfb\u7684\u5904\u7406\u5668\uff09\u3002<br>CentOS \u7684 DVD \u5b89\u88c5\u5149\u76d8\u643a\u5e26\u7684\u5927\u90e8\u5206\u8f6f\u4ef6\u5305\u90fd\u5728 Packages \u76ee\u5f55\u4e2d\uff0c\u901a\u8fc7\u8be5\u76ee\u5f55\u4e2d \u7684\u6587\u4ef6\u53ef\u4ee5\u719f\u6089 RPM \u8f6f\u4ef6\u5305\u7684\u4e00\u822c\u547d\u540d\u683c\u5f0f\u3002\u4f8b\u5982\uff0c\u4ee5\u4e0b\u64cd\u4f5c\u7528\u4e8e\u67e5\u770b DVD \u5149\u76d8\u8bbe\u5907\u4e2d \u643a\u5e26\u7684 bash \u548c fontconfig-devel \u8f6f\u4ef6\u5305\uff08\u5206\u522b\u662f Shell \u89e3\u91ca\u5668\u3001\u5b57\u4f53\u914d\u7f6e\u548c\u5b9a\u5236\u5e93\uff09\u3002\u4e00\u822c \u60c5 \u51b5 \u4e0b \uff0c CentOS \u542f \u52a8 \u540e \u5b89 \u88c5 \u5149 \u76d8 \u4f1a \u81ea \u52a8 \u6302 \u8f7d \u5230 \u7cfb \u7edf \u7684 \/run\/media\/root\/CentOS\\7\\x86_64\/Packages\/\u76ee\u5f55\u4e0b\u3002<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E7%9C%8B%E5%B7%B2%E7%BB%8F%E5%AE%89%E8%A3%85%E7%9A%84%E4%BF%A1%E6%81%AF\"><\/span>\u67e5\u770b\u5df2\u7ecf\u5b89\u88c5\u7684\u4fe1\u606f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u547d\u4ee4<\/th><th>\u4f5c\u7528\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><code>rpm -q \u8f6f\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u6307\u5b9a\u8f6f\u4ef6\u662f\u5426\u5df2\u5b89\u88c5<\/td><\/tr><tr><td>`rpm -qi \u8f6f\u4ef6\u540d`<\/td><td>\u663e\u793a\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f<\/td><\/tr><tr><td><code>rpm -ql \u8f6f\u4ef6\u540d<\/code><\/td><td>\u663e\u793a\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u7684\u6587\u4ef6\u5217\u8868<\/td><\/tr><tr><td>`rpm -qc \u8f6f\u4ef6\u540d`<\/td><td>\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr><tr><td>`rpm -qd \u8f6f\u4ef6\u540d`<\/td><td>\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u7684\u8f6f\u4ef6\u5305\u6587\u6863\u6240\u5728\u4f4d\u7f6e<\/td><\/tr><tr><td><code>rpm -qR \u8f6f\u4ef6\u540d<\/code><\/td><td>\u5217\u51fa\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u7684\u4f9d\u8d56\u7684\u8f6f\u4ef6\u5305\u53ca\u6587\u4ef6<\/td><\/tr><tr><td>`rpm -qF \u6587\u4ef6\u6216\u76ee\u5f55`<\/td><td>\u67e5\u8be2\u5df2\u5b89\u88c5\u7684\u6307\u5b9a\u8f6f\u4ef6\u5c5e\u4e8e\u54ea\u4e2a\u5b89\u88c5\u5305<\/td><\/tr><tr><td>`rpm -qa`<\/td><td>\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u4e2d\u4ee5 rpm \u65b9\u5f0f\u5b89\u88c5\u7684\u6240\u6709\u8f6f\u4ef6\u5217\u8868<\/td><\/tr><tr><td><code>rpm -qa | grep -i postfix<\/code><\/td><td>\u67e5\u8be2\u8f6f\u4ef6 postfix \u662f\u5426\u5df2\u5b89\u88c5<\/td><\/tr><tr><td><code>rpm -qf \u6587\u4ef6\u6216\u76ee\u5f55<\/code><\/td><td>\u67e5\u770b\u6307\u5b9a\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u662f\u54ea\u4e2a\u8f6f\u4ef6\u5305\u6240\u5b89\u88c5\u7684<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%9F%A5%E8%AF%A2%E6%9C%AA%E5%AE%89%E8%A3%85%E7%9A%84_RPM_%E8%BD%AF%E4%BB%B6%E5%8C%85%E6%96%87%E4%BB%B6%E4%B8%AD%E4%BF%A1%E6%81%AF\"><\/span>\u67e5\u8be2\u672a\u5b89\u88c5\u7684 RPM \u8f6f\u4ef6\u5305\u6587\u4ef6\u4e2d\u4fe1\u606f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u547d\u4ee4<\/strong><\/th><th>\u4f5c\u7528\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><code>rpm -qpi RPM\u5305\u6587\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u8be6\u7ec6\u4fe1\u606f<\/td><\/tr><tr><td><code>rpm -qpl RPM\u5305\u6587\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u6587\u4ef6\u5217\u8868<\/td><\/tr><tr><td><code>rpm -qpc RPM\u5305\u6587\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u914d\u7f6e\u6587\u4ef6<\/td><\/tr><tr><td><code>rpm -qpd RPM\u5305\u6587\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u6307\u5b9a\u8f6f\u4ef6\u5305\u7684\u8f6f\u4ef6\u5305\u6587\u6863\u7684\u4f4d\u7f6e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85%E3%80%81%E5%8D%87%E7%BA%A7%E3%80%81%E5%8D%B8%E8%BD%BD_RPM_%E8%BD%AF%E4%BB%B6%E5%8C%85\"><\/span>\u5b89\u88c5\u3001\u5347\u7ea7\u3001\u5378\u8f7d RPM \u8f6f\u4ef6\u5305<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u683c\u5f0f\u548c\u53c2\u6570\uff1a<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>rpm &#91;\u9009\u9879&#93; RPM\u5305\u6587\u4ef6\nrpm -ivh RPM\u8f6f\u4ef6\u5305<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">rpm &#91;\u9009\u9879&#93; RPM\u5305\u6587\u4ef6<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">rpm -ivh RPM\u8f6f\u4ef6\u5305<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>-i\uff1a\u5b89\u88c5\u4e00\u4e2a\u65b0\u7684 RPM \u8f6f\u4ef6\u5305\u3002<\/strong><br>-U\uff1a\u5347\u7ea7\u67d0\u4e2a\u8f6f\u4ef6\u5305\uff0c\u82e5\u672a\u5b89\u88c5\u8fc7\uff0c\u5219\u8fdb\u884c\u5b89\u88c5\u3002<br>-F\uff1a\u5347\u7ea7\u67d0\u4e2a\u8f6f\u4ef6\u5305\uff0c\u82e5\u672a\u5b89\u88c5\u8fc7\uff0c\u5219\u653e\u5f03\u5b89\u88c5\u3002<br><strong>-h\uff1a\u5728\u5b89\u88c5\u6216\u5347\u7ea7\u8f6f\u4ef6\u5305\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4ee5\u201c#\u201d\u53f7\u663e\u793a\u5b89\u88c5\u8fdb\u5ea6\u3002<\/strong><br><strong>-v\uff1a\u663e\u793a\u8f6f\u4ef6\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u8be6\u7ec6\u4fe1\u606f\u3002<\/strong><br>&#8211;force\uff1a\u5f3a\u5236\u5b89\u88c5\u67d0\u4e2a\u8f6f\u4ef6\u5305\uff0c\u6bd4\u5982\u8981\u5b89\u88c5\u7248\u672c\u66f4\u65e7\u7684\u8f6f\u4ef6\u5305<br><strong>-e\uff1a\u5378\u8f7d\u6307\u5b9a\u540d\u79f0\u7684\u8f6f\u4ef6\u5305\u3002<\/strong><br>&#8211;nodeps\uff1a\u5728\u5b89\u88c5\u6216\u5347\u7ea7\u3001\u5378\u8f7d\u4e00\u4e2a\u8f6f\u4ef6\u5305\u65f6\uff0c\u4e0d\u68c0\u67e5\u4e0e\u5176\u4ed6\u8f6f\u4ef6\u5305\u7684\u4f9d\u8d56\u5173\u7cfb\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"699\" height=\"56\" src=\"https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-9.png\" alt=\"\" class=\"wp-image-101\" srcset=\"https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-9.png 699w, https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-9-300x24.png 300w\" sizes=\"(max-width: 699px) 100vw, 699px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"YUM\"><\/span>YUM<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u5b89\u88c5\u6e90\u4ee3\u7801\u8f6f\u4ef6\u5305\u9700\u8981\u7f16\u8bd1\u5b89\u88c5\uff0c\u9700\u8981\u5b89\u88c5\u652f\u6301c\u548cc++\u7a0b\u5e8f\u8bed\u8a00\u7684\u7f16\u8bd1\u5668\uff0c\u5982gcc\u3001gcc-c++\u3001make<br>\u5982\u679c\u4f7f\u7528rpm\u65b9\u5f0f\u5b89\u88c5\uff0c\u5219\u9700\u8981\u5148\u5b89\u88c5\u591a\u4e2a\u4f9d\u8d56\u5305\uff0c\u8fd9\u6837\u4f1a\u5f88\u7e41\u7410\u3002\u8fd9\u91cc\u53ef\u4ee5\u4f7f\u7528 yum\u65b9\u5f0f\u8fdb\u884c\u4e00\u952e\u5b89\u88c5\u3002<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u81ea\u5b9a\u4e49\u7684yum\u7684\u6e90\uff0c\u9ed8\u8ba4\u5728<code>\/etc\/yum.repos.d\/<\/code>\u4e0b\u9762\uff0c\u53ef\u4ee5\u81ea\u5df1\u5efa\u7acb\u65b0\u7684repo\u6765\u4f7f\u5f97yum\u5de5\u4f5c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"repo%E6%96%87%E4%BB%B6%E7%A4%BA%E4%BE%8B\"><\/span>repo\u6587\u4ef6\u793a\u4f8b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0\u5efa\u6587\u4ef6<code>\/etc\/yum.repos.d\/local.repo<\/code><\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>&#91;local&#93;    #\u4ed3\u5e93\u7c7b\u522b\nname=local     #\u4ed3\u5e93\u540d\u79f0\nbaseurl=file:\/\/\/mnt     #\u6307\u5b9aURL \u8bbf\u95ee\u8def\u5f84\u4e3a\u5149\u76d8\u6302\u8f7d\u76ee\u5f55\nenabled=1     #\u5f00\u542f\u6b64yum\u6e90\uff0c\u6b64\u4e3a\u9ed8\u8ba4\u9879\uff0c\u53ef\u7701\u7565\ngpgcheck=0     #\u4e0d\u9a8c\u8bc1\u8f6f\u4ef6\u5305\u7684\u7b7e\u540d<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">&#91;local&#93;    #\u4ed3\u5e93\u7c7b\u522b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">name=local     #\u4ed3\u5e93\u540d\u79f0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">baseurl=file:\/\/\/mnt     #\u6307\u5b9aURL \u8bbf\u95ee\u8def\u5f84\u4e3a\u5149\u76d8\u6302\u8f7d\u76ee\u5f55<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">enabled=1     #\u5f00\u542f\u6b64yum\u6e90\uff0c\u6b64\u4e3a\u9ed8\u8ba4\u9879\uff0c\u53ef\u7701\u7565<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">gpgcheck=0     #\u4e0d\u9a8c\u8bc1\u8f6f\u4ef6\u5305\u7684\u7b7e\u540d<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0\u5efa\u6e90\u5b8c\u6210\u540e\uff0c\u4f7f\u7528<code>yum clean all &amp;&amp; yum makecache<\/code> \u4ee5\u5220\u9664yum\u7f13\u5b58\u5e76\u66f4\u65b0<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"yum%E5%B8%B8%E7%94%A8%E7%9A%84%E6%93%8D%E4%BD%9C%E5%91%BD%E4%BB%A4\"><\/span>yum\u5e38\u7528\u7684\u64cd\u4f5c\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u547d\u4ee4<\/th><th>\u4f5c\u7528\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><code><strong>yum -y install \u8f6f\u4ef6\u540d<\/strong><\/code><\/td><td>\u5b89\u88c5\u3001\u5347\u7ea7\u8f6f\u4ef6\u5305\uff0c\u201c-y\u201d\u8868\u793a\u81ea\u52a8\u786e\u8ba4<\/td><\/tr><tr><td><code><strong>yum -y remove \u8f6f\u4ef6\u540d<\/strong><\/code><\/td><td>\u5378\u8f7d\u8f6f\u4ef6\u5305\uff0c\u53ef\u81ea\u52a8\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb<\/td><\/tr><tr><td><code>yum -y update \u8f6f\u4ef6\u540d<\/code><\/td><td>\u5347\u7ea7\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum list<\/code><\/td><td>\u67e5\u8be2\u8f6f\u4ef6\u5305\u5217\u8868<\/td><\/tr><tr><td><code><strong>yum list installed<\/strong><\/code><\/td><td>\u67e5\u8be2\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum list available<\/code><\/td><td>\u67e5\u8be2\u4ed3\u5e93\u4e2d\u5c1a\u672a\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum list updates<\/code><\/td><td>\u67e5\u8be2\u53ef\u4ee5\u5347\u7ea7\u7248\u672c\u7684\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum info \u8f6f\u4ef6\u540d<\/code><\/td><td>\u67e5\u8be2\u8f6f\u4ef6\u5305\u7684\u63cf\u8ff0\u4fe1\u606f<\/td><\/tr><tr><td><code><strong>yum search [all] \u5173\u952e\u8bcd<\/strong><\/code><\/td><td>\u6839\u636e\u5173\u952e\u8bcd\u67e5\u627e\u76f8\u5173\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum whatprovides \u547d\u4ee4<\/code><\/td><td>\u67e5\u8be2\u547d\u4ee4\u5c5e\u4e8e\u54ea\u4e2a\u8f6f\u4ef6\u5305<\/td><\/tr><tr><td><code>yum install \u5305\u540d -y --downloadonly --downloaddir=\/tmp\/<\/code><\/td><td>\u4e0b\u8f7dRPM\u5305\u5230\u6307\u5b9a\u76ee\u5f55<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u793a\u8303\uff1a\u4f7f\u7528yum\u5b89\u88c5\u4e00\u4e9b\u5f00\u53d1\u5de5\u5177<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"514\" height=\"179\" src=\"https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-10.png\" alt=\"\" class=\"wp-image-102\" srcset=\"https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-10.png 514w, https:\/\/www.mooloco.com\/wp-content\/uploads\/2025\/08\/image-10-300x104.png 300w\" sizes=\"(max-width: 514px) 100vw, 514px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%9C%A8%E7%BA%BFrepo%E6%BA%90\"><\/span>\u5728\u7ebfrepo\u6e90<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u963f\u91cc\u4e91\u7684 yum \u6e90\u662f\u56fd\u5185\u5f88\u591a Linux \u7528\u6237\u5e38\u7528\u7684\u955c\u50cf\u6e90\u4e4b\u4e00\uff0c\u5b83\u901f\u5ea6\u5feb\u3001\u7a33\u5b9a\uff0c\u9002\u5408\u7528\u6765\u66ff\u6362\u9ed8\u8ba4\u7684\u5b98\u65b9 yum \u6e90\uff0c\u4ece\u800c\u63d0\u9ad8\u8f6f\u4ef6\u5305\u4e0b\u8f7d\u548c\u66f4\u65b0\u7684\u901f\u5ea6\u3002<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5907\u4efd\u5f53\u524d\u7684 yum \u6e90\u914d\u7f6e\uff1a<br><code>mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup<\/code><br><br>\u4e0b\u8f7d\u963f\u91cc\u4e91\u7684 CentOS 7 yum \u6e90\u914d\u7f6e\u6587\u4ef6\uff1a<br><code>curl -o \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.aliyun.com\/repo\/Centos-7.repo<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3010\u53ef\u9009\u3011\u817e\u8baf\u7684\u8f6f\u4ef6\u6e90\uff1a<br><code>wget -O \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.cloud.tencent.com\/repo\/centos7_base.repo<\/code><br><code><code>curl -o \/etc\/yum.repos.d\/CentOS-Base.repo http:\/\/mirrors.cloud.tencent.com\/repo\/centos7_base.repo<\/code><\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br>\u6e05\u7406\u7f13\u5b58\u5e76\u91cd\u65b0\u751f\u6210\u7f13\u5b58\uff1a<br><code>yum clean all<br>yum makecache<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u81ea\u6b64\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u5728\u7ebf\u4ed3\u5e93\u6765\u7ba1\u7406\u7cfb\u7edf\u7684\u8f6f\u4ef6\u4e86\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%BA%90%E4%BB%A3%E7%A0%81%E5%AE%89%E8%A3%85\"><\/span>\u6e90\u4ee3\u7801\u5b89\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><em>\u6e90\u7801\u5b89\u88c5\u662f\u6307\u901a\u8fc7\u4e0b\u8f7d\u8f6f\u4ef6\u7684\u6e90\u4ee3\u7801\u6587\u4ef6\uff08\u901a\u5e38\u662f <code>.tar.gz<\/code>\u3001<code>.tar.bz2<\/code> \u7b49\u538b\u7f29\u5305\uff09\uff0c\u7136\u540e\u5728\u672c\u5730\u7f16\u8bd1\u751f\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u518d\u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u3002<\/em><br><em>\u6e90\u7801\u5b89\u88c5\u5141\u8bb8\u7528\u6237\u81ea\u5b9a\u4e49\u7f16\u8bd1\u9009\u9879\u3001\u5b89\u88c5\u8def\u5f84\uff0c\u751a\u81f3\u53ef\u4ee5\u4fee\u6b63\u6e90\u7801\u4e2d\u7684bug\u6216\u5e94\u7528\u8865\u4e01\u3002<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7%E9%A2%84%E8%A3%85\"><\/span>\u5f00\u53d1\u5de5\u5177\u9884\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#d8dee9ff;display:none\" aria-label=\"\u590d\u5236\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>yum install gcc* apr-devel* pkgconfig* libapr* pcre pcre-devel libtool libxml2-devel apr-util* -y<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #D8DEE9FF\">yum install gcc* apr-devel* pkgconfig* libapr* pcre pcre-devel libtool libxml2-devel apr-util* -y<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8bd1\u5b89\u88c5\u7684\u57fa\u672c\u8fc7\u7a0b\uff1a<strong><br>1)tar \u89e3\u5305<br><code>tar zxvf\/jxvf xxx.tar.gz\/xxx.tar.bz2 -C \u76ee\u6807\u8def\u5f84<\/code><br>2)\u914d\u7f6e\u8f6f\u4ef6\u6a21\u5757\uff08\u5b89\u88c5\u8def\u5f84\u3001\u5f00\u542f\u6216\u5173\u95ed\u6a21\u5757\u529f\u80fd\u3001\u7ba1\u7406\u670d\u52a1\u8fdb\u7a0b\u7684\u7528\u6237\u8bbe\u5b9a\uff09<br><code>.\/configure --prefix=\u76ee\u6807\u8def\u5f84(\u6b64\u8f6f\u4ef6\u5b89\u88c5\u5230\u54ea\u91cc\u53bb)<\/code><br>3)\u7f16\u8bd1\uff08\u5c06\u6e90\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u7684\u7a0b\u5e8f\uff09<br><code>make<\/code><br>4)\u5b89\u88c5<br><code>make install<\/code><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%BB%93%E8%AF%AD\"><\/span>\u7ed3\u8bed<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>RPM<\/strong> \u662f\u4e00\u79cd\u57fa\u4e8e\u4e8c\u8fdb\u5236\u5305\u7684\u4f4e\u7ea7\u8f6f\u4ef6\u7ba1\u7406\u5de5\u5177\uff0c\u76f4\u63a5\u5b89\u88c5 <code>.rpm<\/code> \u683c\u5f0f\u7684\u8f6f\u4ef6\u5305\u3002\u5b83\u64cd\u4f5c\u7075\u6d3b\uff0c\u9002\u5408\u7cbe\u786e\u7ba1\u7406\u5355\u4e2a\u8f6f\u4ef6\u5305\uff0c\u4f46\u5b83\u4e0d\u4f1a\u81ea\u52a8\u5904\u7406\u4f9d\u8d56\u5173\u7cfb\uff0c\u7528\u6237\u9700\u8981\u81ea\u884c\u89e3\u51b3\u4f9d\u8d56\u95ee\u9898\u3002\u56e0\u6b64\uff0crpm \u9002\u7528\u4e8e\u5df2\u7ecf\u660e\u786e\u4f9d\u8d56\u5173\u7cfb\u4e14\u53ea\u9700\u5feb\u901f\u5b89\u88c5\u7279\u5b9a\u5305\u7684\u573a\u666f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>YUM<\/strong> \u5219\u662f\u57fa\u4e8e RPM \u4e4b\u4e0a\u7684\u9ad8\u7ea7\u5305\u7ba1\u7406\u5668\uff0c\u80fd\u591f\u81ea\u52a8\u89e3\u51b3\u8f6f\u4ef6\u5305\u4e4b\u95f4\u7684\u4f9d\u8d56\u95ee\u9898\u3002\u5b83\u652f\u6301\u4ece\u8fdc\u7a0b\u4ed3\u5e93\u4e0b\u8f7d\u5b89\u88c5\u548c\u5347\u7ea7\u8f6f\u4ef6\u5305\uff0c\u4f7f\u7528\u8d77\u6765\u66f4\u7b80\u5355\u65b9\u4fbf\uff0c\u7279\u522b\u9002\u5408\u65e5\u5e38\u7684\u8f6f\u4ef6\u5b89\u88c5\u548c\u7cfb\u7edf\u66f4\u65b0\u7ba1\u7406\u3002\u7531\u4e8e\u4f9d\u8d56\u4ed3\u5e93\u7684\u53ef\u7528\u6027\uff0cyum \u5728\u7075\u6d3b\u6027\u4e0a\u4e0d\u5982\u6e90\u7801\u5b89\u88c5\uff0c\u4f46\u6781\u5927\u5730\u63d0\u9ad8\u4e86\u7528\u6237\u4f53\u9a8c\u548c\u6548\u7387\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6e90\u7801\u5b89\u88c5<\/strong> \u662f\u4ece\u8f6f\u4ef6\u7684\u6e90\u4ee3\u7801\u5f00\u59cb\uff0c\u7ecf\u8fc7\u7f16\u8bd1\u548c\u6784\u5efa\u540e\u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u3002\u5b83\u5141\u8bb8\u7528\u6237\u6839\u636e\u9700\u6c42\u81ea\u5b9a\u4e49\u7f16\u8bd1\u53c2\u6570\u548c\u5b89\u88c5\u8def\u5f84\uff0c\u9002\u5408\u9700\u8981\u7279\u5b9a\u7248\u672c\u6216\u7279\u6b8a\u529f\u80fd\u7684\u8f6f\u4ef6\uff0c\u6216\u8005\u5b98\u65b9\u4ed3\u5e93\u4e2d\u6ca1\u6709\u7684\u5305\u3002\u6e90\u7801\u5b89\u88c5\u867d\u7136\u7075\u6d3b\u5f3a\u5927\uff0c\u4f46\u8fc7\u7a0b\u590d\u6742\u4e14\u8017\u65f6\u8f83\u957f\uff0c\u4f9d\u8d56\u548c\u5378\u8f7d\u7ba1\u7406\u76f8\u5bf9\u9ebb\u70e6\uff0c\u66f4\u9002\u5408\u6709\u4e00\u5b9a\u6280\u672f\u80cc\u666f\u7684\u7528\u6237\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RPM\uff08Red Hat Package Manager\uff09 YUM\uff08Yellowdog Updater Modi<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"https:\/\/www.mooloco.com\/?p=99\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-99","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/posts\/99","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=99"}],"version-history":[{"count":5,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/posts\/99\/revisions"}],"predecessor-version":[{"id":229,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=\/wp\/v2\/posts\/99\/revisions\/229"}],"wp:attachment":[{"href":"https:\/\/www.mooloco.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=99"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=99"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mooloco.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}