{"id":514,"date":"2016-07-18T05:38:53","date_gmt":"2016-07-17T21:38:53","guid":{"rendered":"http:\/\/carlos.aboutmy.info\/blog\/?p=514"},"modified":"2016-08-30T02:35:16","modified_gmt":"2016-08-29T18:35:16","slug":"%e5%a6%82%e4%bd%95%e5%bb%ba%e7%ab%8b-rpm-private-repository-%e7%a7%81%e6%9c%89-rpm-%e5%80%89%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/carlos.aboutmy.info\/blog\/?p=514","title":{"rendered":"\u5982\u4f55\u5efa\u7acb RPM private repository (\u79c1\u6709 RPM \u5009\u5eab)"},"content":{"rendered":"<p>\u5728 Linux deploy \u8edf\u4ef6\uff0c\u6700\u7c21\u55ae\u53c8\u7a69\u9663\u7684\u65b9\u6cd5\uff0c\u7576\u7136\u662f\u4f7f\u7528 package\u3002\u5373 RHEL\/CentOS\/Fedora \u5c31\u7528 RPM\uff0cDebian\/Ubuntu \u5c31\u7528 DEB\u3002\u9996\u5148\u628a\u81ea\u5df1\u7684\u8edf\u4ef6 compile \u518d\u5305\u88dd\u6210 RPM\u3002\u7576\u6709\u4e86 RPM \u5f8c\uff0c\u53ef\u4ee5\u76f4\u63a5 <code>\"yum install package.rpm\"<\/code>\u3002<\/p>\n<p>\u4e0d\u904e\uff0c\u7576 packages \u6bd4\u8f03\u591a\uff0c\u53c8\u6216\u9700\u8981\u505a\u7248\u672c update \u6642\uff0c\u5c31\u6703\u986f\u5f97\u9ebb\u7169\uff0c\u6bd4\u8f03\u7406\u60f3\u662f\u5efa\u7acb\u79c1\u6709 package repository\u3002\u4ee5\u4e0b\u4ee5 MySQL \u70ba\u4f8b\uff0c\u81ea\u5f9e MariaDB \u6210\u70ba\u5404\u5927\u7248\u672c\u6a19\u6e96 package\uff0cMySQL \u5c31\u88ab\u8e22\u51fa\u4e86\u3002<\/p>\n<p>Oracle \u6709\u63d0\u4f9b MySQL \u7684 CentOS 7 RPM\u3002\u9996\u5148\uff0c\u4e0b\u8f09\u6574\u500b bundle.tar\uff0c\u4e4b\u5f8c untar \u653e\u9032\u81ea\u5df1\u90e8\u6a5f\u7684 directory \u6216 Web Server\u3002\u63a5\u8457\uff0c\u628a\u7c3d\u7f72 package <code>\"rpm --addsign *.rpm\"<\/code>\ufe50\u5c31\u53ef <code>\"createrepo .\"<\/code>\u3002\u4f60\u6703\u767c\u73fe\u591a\u4e86\u4e00\u500b \u53eb repodata \u7684 folder\uff0c\u90a3\u5373\u662f\u6210\u529f\u4e86\u3002<\/p>\n<p>\u6700\u5f8c\uff0c\u6574\u4e00\u500b <code>xxxx.repo<\/code> \u653e\u9032 <code>\/etc\/yum.repos.d\/<\/code> \u4fbf\u53ef\u3002<code>xxxx.repo<\/code> \u7684\u7bc4\u4f8b\u5982\u4e0b\uff1a<\/p>\n<blockquote><p>\n[aboutmyinfo]<br \/>\nname=About My Info<br \/>\nbaseurl=http:\/\/www.aboutmy.info\/repo\/centos\/$releasever\/$basearch<br \/>\nenabled=1<br \/>\ngpgcheck=1<br \/>\ngpgkey=http:\/\/www.aboutmy.info\/repo\/centos\/$releasever\/$basearch\/RPM-GPG-KEY\n<\/p><\/blockquote>\n<p>\u5927\u529f\u544a\u6210\u5f8c\uff0c\u4fbf\u53ef <code>\"yum install MySQL-server\"<\/code><\/p>\n<p><a href=\"\/blog_uploads\/2016\/07\/add-private-repo.png\"><img loading=\"lazy\" width=\"1417\" height=\"742\" src=\"\/blog_uploads\/2016\/07\/add-private-repo.png\" alt=\"add private repo\" class=\"alignnone size-full wp-image-515\" \/><\/a><\/p>\n<p><a href=\"\/blog_uploads\/2016\/07\/import-self-sign-key.png\"><img loading=\"lazy\" width=\"1417\" height=\"844\" src=\"\/blog_uploads\/2016\/07\/import-self-sign-key.png\" alt=\"import self sign key\" class=\"alignnone size-full wp-image-516\" \/><\/a><\/p>\n<p>\u7b2c\u4e00\u6b21\u5f9e\u79c1\u6709 repository \u5b89\u88dd package \u6642\uff0c\u7cfb\u7d71\u6703\u8a62\u554f\u662f\u5426 import \u81ea\u5df1\u7684 sign key\uff0c\u7b54 Y \u4fbf\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Linux deploy \u8edf\u4ef6\uff0c\u6700\u7c21\u55ae\u53c8\u7a69\u9663\u7684\u65b9\u6cd5\uff0c\u7576\u7136\u662f\u4f7f\u7528 package\u3002\u5373 RHEL\/CentOS\/Fedora \u5c31\u7528 RPM\uff0cDebian\/Ubuntu \u5c31\u7528 DEB\u3002\u9996\u5148\u628a\u81ea\u5df1\u7684\u8edf\u4ef6 compile \u518d\u5305\u88dd\u6210 RPM\u3002\u7576\u6709\u4e86 RPM \u5f8c\uff0c\u53ef\u4ee5\u76f4\u63a5 &#8220;yum install package.rpm&#8221;\u3002 \u4e0d\u904e\uff0c\u7576 packages \u6bd4\u8f03\u591a\uff0c\u53c8\u6216\u9700\u8981\u505a\u7248\u672c update \u6642\uff0c\u5c31\u6703\u986f\u5f97\u9ebb\u7169\uff0c\u6bd4\u8f03\u7406\u60f3\u662f\u5efa\u7acb\u79c1\u6709 package repository\u3002\u4ee5\u4e0b\u4ee5 MySQL \u70ba\u4f8b\uff0c\u81ea\u5f9e MariaDB \u6210\u70ba\u5404\u5927\u7248\u672c\u6a19\u6e96 package\uff0cMySQL \u5c31\u88ab\u8e22\u51fa\u4e86\u3002 Oracle \u6709\u63d0\u4f9b MySQL \u7684 CentOS 7 RPM\u3002\u9996\u5148\uff0c\u4e0b\u8f09\u6574\u500b bundle.tar\uff0c\u4e4b\u5f8c untar \u653e\u9032\u81ea\u5df1\u90e8\u6a5f\u7684 directory \u6216 Web Server\u3002\u63a5\u8457\uff0c\u628a\u7c3d\u7f72 package &#8220;rpm &#8211;addsign *.rpm&#8221;\ufe50\u5c31\u53ef &#8220;createrepo .&#8221;\u3002\u4f60\u6703\u767c\u73fe\u591a\u4e86\u4e00\u500b \u53eb repodata \u7684 folder\uff0c\u90a3\u5373\u662f\u6210\u529f\u4e86\u3002\u2026 <span class=\"read-more\"><a href=\"https:\/\/carlos.aboutmy.info\/blog\/?p=514\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514"}],"collection":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=514"}],"version-history":[{"count":8,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions"}],"predecessor-version":[{"id":530,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/514\/revisions\/530"}],"wp:attachment":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}