{"id":172666,"date":"2020-02-23T10:42:42","date_gmt":"2020-02-23T02:42:42","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=172666"},"modified":"2020-02-20T13:45:25","modified_gmt":"2020-02-20T05:45:25","slug":"rhel-centos-yum","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/rhel-centos-yum.html","title":{"rendered":"RHEL7\u5b89\u88c5\u672c\u5730\u79bb\u7ebfyum\u6e90\u4ed3\u5e93"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5f88\u5bf9\u4f7f\u7528RHEL\u7248\u672c\u64cd\u4f5c\u7cfb\u7edf\u7684\u670b\u53cb\u90fd\u77e5\u9053RHEL\u5728\u7ebf\u5b89\u88c5\u8f6f\u4ef6\u5305\u662f\u901a\u8fc7yum\u6e90\u6765\u5b89\u88c5\u7684\uff0c\u5728\u6ca1\u6709\u8ba2\u9605\u670d\u52a1\u7684\u60c5\u51b5\u4e0b\u4e0d\u80fd\u76f4\u63a5\u4f7f\u7528\uff0c\u8be5\u600e\u4e48\u529e\u5462\uff0c\u63a5\u4e0b\u6765\u4ecb\u7ecd\u4e00\u79cd\u5f88\u7b80\u5355\u7684\u65b9\u5f0f\u914d\u7f6e\u672c\u5730yum\u6e90\u4ed3\u5e93\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u521b\u5efa\u76ee\u5f55<\/strong><\/div>\n
\u9996\u5148\u521b\u5efa\u5149\u76d8\u955c\u50cf\u6302\u8f7d\u76ee\u5f55\uff1a<\/strong><\/span><\/div>\n
[root@localhost ~]# mkdir \/mnt\/media<\/pre>\n
\u7136\u540e\u521b\u5efa\u8f6f\u4ef6\u5305\u5b58\u653e\u76ee\u5f55<\/strong><\/span><\/div>\n
[root@localhost ~]# mkdir \/root\/123<\/pre>\n
\u6302\u8f7d\uff0c\u5b89\u88c5yum\u76f8\u5173\u5305<\/strong><\/div>\n

\u5c06\u865a\u62df\u673a\u955c\u50cf\u6302\u8f7d\u5230\u521a\u521a\u521b\u5efa\u7684\u76ee\u5f55<\/p>\n

[root@localhost ~]# mount \/dev\/cdrom \/mnt\/media\r\n[root@localhost ~]# cd \/mnt\/media\r\n[root@localhost media]# cd Packages\r\n[root@localhost Packages]# rpm -ivh deltarpm-3.6-3.el7.x86_64.rpm\r\n\u8b66\u544a\uff1adeltarpm-3.6-3.el7.x86_64.rpm: \u5934V3 RSA\/SHA256 Signature, \u5bc6\u94a5 ID f4a80eb5: NOKEY\r\n\u51c6\u5907\u4e2d...                          ################################# [100%]\r\n\t\u8f6f\u4ef6\u5305 deltarpm-3.6-3.el7.x86_64 \u5df2\u7ecf\u5b89\u88c5\r\n[root@localhost Packages]# rpm -ivh python-deltarpm-3.6-3.el7.x86_64.rpm \r\n\u8b66\u544a\uff1apython-deltarpm-3.6-3.el7.x86_64.rpm: \u5934V3 RSA\/SHA256 Signature, \u5bc6\u94a5 ID f4a80eb5: NOKEY\r\n\u51c6\u5907\u4e2d...                          ################################# [100%]\r\n\t\u8f6f\u4ef6\u5305 python-deltarpm-3.6-3.el7.x86_64 \u5df2\u7ecf\u5b89\u88c5\r\n[root@localhost Packages]# rpm -ivh createrepo-0.9.9-28.el7.noarch.rpm \r\n\u8b66\u544a\uff1acreaterepo-0.9.9-28.el7.noarch.rpm: \u5934V3 RSA\/SHA256 Signature, \u5bc6\u94a5 ID f4a80eb5: NOKEY\r\n\u51c6\u5907\u4e2d...                          ################################# [100%]\r\n\t\u8f6f\u4ef6\u5305 createrepo-0.9.9-28.el7.noarch \u5df2\u7ecf\u5b89\u88c5\r\n<\/pre>\n
\u590d\u5236\u8f6f\u4ef6\u5305<\/strong><\/div>\n
\r\n[root@localhost Packages]# cd ..\r\n[root@localhost media]# cp -r * \/root\/123\r\n[root@localhost media]# cd \/etc\/yum.repos.d\/\r\n[root@localhost yum.repos.d]# vim 123.repo<\/pre>\n
\u521b\u5efa\u914d\u7f6e\u6587\u4ef6<\/strong><\/div>\n
[root@localhost ~]# cd \/etc\/yum.repos.d\/\r\n[root@localhost ~]# vim 123.repo<\/pre>\n

\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9<\/p>\n

[root@localhost yum.repos.d]# cat 123.repo \r\n[123]\r\nname=123\r\nbaseurl=file:\/\/\/root\/123\r\nenabled=1\r\ngpgcheck=0\r\n<\/pre>\n
\u5236\u4f5c<\/strong><\/div>\n
[root@localhost yum.repos.d]# createrepo \/root\/123<\/pre>\n

\u5982\u6b64\u672c\u5730yum\u6e90\u4ed3\u5e93\u5c31\u5236\u4f5c\u597d\u4e86<\/p>\n

\u6d4b\u8bd5<\/strong><\/div>\n
\r\n[root@localhost ~]# yum install -y vsftpd\r\n\u5df2\u52a0\u8f7d\u63d2\u4ef6\uff1afastestmirror, langpacks\r\n123                                                                                                                                              | 2.9 kB  00:00:00     \r\n123\/primary_db                                                                                                                                   | 3.0 MB  00:00:00     \r\nDetermining fastest mirrors\r\n\u6b63\u5728\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\r\n--> \u6b63\u5728\u68c0\u67e5\u4e8b\u52a1\r\n---> \u8f6f\u4ef6\u5305 vsftpd.x86_64.0.3.0.2-22.el7 \u5c06\u88ab \u5b89\u88c5\r\n--> \u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\u5b8c\u6210\r\n\r\n\u4f9d\u8d56\u5173\u7cfb\u89e3\u51b3\r\n\r\n========================================================================================================================================================================\r\n Package                                \u67b6\u6784                                   \u7248\u672c                                           \u6e90                                   \u5927\u5c0f\r\n========================================================================================================================================================================\r\n\u6b63\u5728\u5b89\u88c5:\r\n vsftpd                                 x86_64                                 3.0.2-22.el7                                   123                                 169 k\r\n\r\n\u4e8b\u52a1\u6982\u8981\r\n========================================================================================================================================================================\r\n\u5b89\u88c5  1 \u8f6f\u4ef6\u5305\r\n\r\n\u603b\u4e0b\u8f7d\u91cf\uff1a169 k\r\n\u5b89\u88c5\u5927\u5c0f\uff1a348 k\r\nDownloading packages:\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\n  \u6b63\u5728\u5b89\u88c5    : vsftpd-3.0.2-22.el7.x86_64                                                                                                                          1\/1 \r\n  \u9a8c\u8bc1\u4e2d      : vsftpd-3.0.2-22.el7.x86_64                                                                                                                          1\/1 \r\n\r\n\u5df2\u5b89\u88c5:\r\n  vsftpd.x86_64 0:3.0.2-22.el7                                                                                                                                          \r\n\r\n\u5b8c\u6bd5\uff01\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

[root@localhost ~]# mkdir \/mnt\/media [root@localhost ~] […]<\/p>\n","protected":false},"author":1469,"featured_media":172673,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-172666","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172666","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=172666"}],"version-history":[{"count":11,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172666\/revisions"}],"predecessor-version":[{"id":172787,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/172666\/revisions\/172787"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/172673"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=172666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=172666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=172666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}