{"id":5320,"date":"2013-07-08T16:15:06","date_gmt":"2013-07-08T08:15:06","guid":{"rendered":"http:\/\/jpuyy.com\/?p=5320"},"modified":"2015-02-03T15:12:06","modified_gmt":"2015-02-03T07:12:06","slug":"build-mariadb-rpm-packages","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=5320","title":{"rendered":"\u5236\u4f5cMariaDB5.5.31\u7684rpm\u5305"},"content":{"rendered":"<p>\u5236\u4f5cMariaDB\u7684rpm\u5305\u4f7f\u7528<a href=\"http:\/\/www.cmake.org\/Wiki\/CMake:CPackPackageGenerators\">CMake CPack Package Generators<\/a>\uff0c\u8fd9\u79cd\u5236\u4f5c\u51fa\u6765\u7684\u5305\u53eb\u505aCPackRPM\u5305\u3002<\/p>\n<p>\u9996\u5148\u5b89\u88c5\u597d\u73af\u5883\uff08\u5fc5\u987b\u5168\u90e8\u68c0\u67e5\uff09\uff1a<\/p>\n<p>bzr &gt; 2.0<br \/>\ngunzip<br \/>\nGNU tar<br \/>\ngcc 2.95.2 or later<br \/>\ng++<br \/>\nGNU make 3.75 or later<br \/>\nlibtool 1.5.24 or later<br \/>\nbison (2.0 for MariaDB 5.5)<br \/>\nlibncurses (\u5728centos\u4e0b\u540d\u4e3ancurses-devel)<br \/>\nzlib-dev<br \/>\nGNU automake<br \/>\nGNU autoconf<br \/>\ncmake &gt;= 2.8.7 (\u5728centos\u4e0b\u540d\u4e3acmake28)<\/p>\n<p>\u4f7f\u7528\u975eroot\u7528\u6237\uff0c\u5c06\u4e0b\u8f7d\u597d\u7684mariadb-5.5.31.tar.gz\u89e3\u538b\uff0c\u8fd9\u91cc\u662f\u00a0\/home\/jpuyy\/mariadb-5.5.31\u3002<\/p>\n<p>\u5c06\u8981\u7f16\u8bd1\u7684\u53c2\u6570\u5199\u5230cmake\u540e\u9762\uff0c\u8fd9\u91cc\u662f\u6700\u5173\u952e\u7684\u662f\u5236\u4f5crpm\u5305\u7684\u53c2\u6570-DRPM=centos6\uff0c\u8bed\u53e5\u7684\u6700\u540e\u8981\u6709\u4e00\u4e2a\u70b9\u53f7\uff0c\u8868\u793a\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u3002<\/p>\n<pre>cmake28 -DRPM=centos6 \\\r\n-DCMAKE_INSTALL_PREFIX=\/usr\/local\/DBServer\/MariaDB5.5.31 \\\r\n-DWITH_INNOBASE_STORAGE_ENGINE=1 \\\r\n-DWITH_PARTITION_STORAGE_ENGINE=1 \\\r\n-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \\\r\n-DWITH_MYISAM_STORAGE_ENGINE=1 \\\r\n-DENABLED_LOCAL_INFILE=1 \\\r\n-DDEFAULT_CHARSET=utf8 \\\r\n-DDEFAULT_COLLATION=utf8_general_ci \\\r\n-DWITH_EXTRA_CHARSETS=complex .<\/pre>\n<p>\u5f53\u6700\u540e\u51e0\u884c\u662f\u5982\u4e0b\u4fe1\u606f\u65f6\uff0c\u8868\u793a\u68c0\u67e5\u7f16\u8bd1\u901a\u8fc7<\/p>\n<pre>-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: \/home\/jpuyy\/mariadb-5.5.31<\/pre>\n<p>\u6253\u5305<\/p>\n<pre>make package<\/pre>\n<p>\u8fdespec\u6587\u4ef6\u90fd\u4e0d\u7528\u5199\uff0ccmake\u4f1a\u81ea\u52a8\u751f\u6210\u5236\u4f5crpm\u7684\u73af\u5883\uff0c\u4f4d\u7f6e\u5728\/home\/jpuyy\/mariadb-5.5.31\/_CPack_Packages\/Linux\/RPM<\/p>\n<p>\u6700\u540e\u751f\u6210\u7684rpm\u5305\u5982\u4e0b<\/p>\n<p>MariaDB-5.5.31-centos6-x86_64-client.rpm<br \/>\nMariaDB-5.5.31-centos6-x86_64-common.rpm<br \/>\nMariaDB-5.5.31-centos6-x86_64-devel.rpm<br \/>\nMariaDB-5.5.31-centos6-x86_64-server.rpm<br \/>\nMariaDB-5.5.31-centos6-x86_64-shared.rpm<br \/>\nMariaDB-5.5.31-centos6-x86_64-test.rpm<\/p>\n<p>\u8fd9\u4e9b\u5305\u7684\u4f5c\u7528<\/p>\n<p><a href=\"https:\/\/kb.askmonty.org\/en\/about-the-mariadb-rpm-files\/\">https:\/\/kb.askmonty.org\/en\/about-the-mariadb-rpm-files\/<\/a><\/p>\n<p>\u5b89\u88c5\u65b9\u6cd5\uff1a<\/p>\n<p>\u9700\u8981\u89e3\u51b3\u51b2\u7a81\u548c\u4f9d\u8d56<\/p>\n<p>\u51b2\u7a81\uff1a\u67e5\u627e\u5df2\u7ecf\u5b89\u88c5\u7684mysql\u5305\uff0crpm -qa &#8216;mysql*&#8217;\uff0c\u79fb\u9664\u67e5\u627e\u5230\u7684mysql\u5305<\/p>\n<pre>rpm -e\u00a0mysql-libs-5.1.66-2.el6_3.x86_64\u00a0--nodeps\r\nrpm -e `rpm -qa mysql-libs*` --nodeps\r\n<\/pre>\n<p>\u4f9d\u8d56\uff1a\u5728\u6267\u884crpm -ivh\u00a0MariaDB-5.5.31-centos6-x86_64*\u65f6\uff0c\u5982\u679c\u51fa\u73b0\u4f9d\u8d56\uff0c\u5982<\/p>\n<p>error: Failed dependencies:<br \/>\nperl(DBI) is needed by MariaDB-server-5.5.31-1.x86_64<br \/>\nperl(Time::HiRes) is needed by MariaDB-test-5.5.31-1.x86_64<\/p>\n<p>\u53ef\u4ee5yum\u5b89\u88c5perl-DBI\uff0cperl-Time-HiRes\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528<\/p>\n<pre>rpm -ivh MariaDB-5.5.31-centos6-x86_64-* --nodeps<\/pre>\n<p>\u4e0d\u53bb\u68c0\u6d4b\u4f9d\u8d56\u3002PS:\u6709\u4e9b\u4f9d\u8d56\u786e\u5b9e\u65e0\u7528\u53ef\u4e0d\u7528\u5b89\u88c5\u3002<\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<p><a title=\"source-building-mariadb-on-centos\" href=\"https:\/\/kb.askmonty.org\/en\/source-building-mariadb-on-centos\/\" target=\"_blank\">https:\/\/kb.askmonty.org\/en\/source-building-mariadb-on-centos\/<\/a><\/p>\n<p><a href=\"https:\/\/kb.askmonty.org\/en\/installing-mariadb-with-the-rpm-tool\/\">https:\/\/kb.askmonty.org\/en\/installing-mariadb-with-the-rpm-tool\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5236\u4f5cMariaDB\u7684rpm\u5305\u4f7f\u7528CMake CPack Package Generators\uff0c\u8fd9\u79cd\u5236\u4f5c\u51fa\u6765\u7684\u5305\u53eb\u505aCPackRPM\u5305\u3002 \u9996\u5148\u5b89\u88c5\u597d\u73af\u5883\uff08\u5fc5\u987b\u5168\u90e8\u68c0\u67e5\uff09\uff1a bzr &gt; 2.0 gunzip GNU tar gcc 2.95.2 or later g++ GNU make 3.75 or later libtool 1.5.24 or later bison (2.0 for MariaDB 5.5) libncurses (\u5728centos\u4e0b\u540d\u4e3ancurses-devel) zlib-dev GNU automake GNU autoconf cmake &gt;= 2.8.7 (\u5728centos\u4e0b\u540d\u4e3acmake28) \u4f7f\u7528\u975eroot\u7528\u6237\uff0c\u5c06\u4e0b\u8f7d\u597d\u7684mariadb-5.5.31.tar.gz\u89e3\u538b\uff0c\u8fd9\u91cc\u662f\u00a0\/home\/jpuyy\/mariadb-5.5.31\u3002 \u5c06\u8981\u7f16\u8bd1\u7684\u53c2\u6570\u5199\u5230cmake\u540e\u9762\uff0c\u8fd9\u91cc\u662f\u6700\u5173\u952e\u7684\u662f\u5236\u4f5crpm\u5305\u7684\u53c2\u6570-DRPM=centos6\uff0c\u8bed\u53e5\u7684\u6700\u540e\u8981\u6709\u4e00\u4e2a\u70b9\u53f7\uff0c\u8868\u793a\u5728\u5f53\u524d\u76ee\u5f55\u751f\u6210\u3002 cmake28 -DRPM=centos6 \\ -DCMAKE_INSTALL_PREFIX=\/usr\/local\/DBServer\/MariaDB5.5.31 \\ -DWITH_INNOBASE_STORAGE_ENGINE=1 \\ -DWITH_PARTITION_STORAGE_ENGINE=1 \\ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \\ -DWITH_MYISAM_STORAGE_ENGINE=1 [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,65],"tags":[154],"class_list":["post-5320","post","type-post","status-publish","format-standard","hentry","category-life","category-mysql","tag-mariadb"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5320"}],"version-history":[{"count":11,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5320\/revisions"}],"predecessor-version":[{"id":7154,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/5320\/revisions\/7154"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}