MySQL InnoDB Pluginã®ç°¡åãªãã«ãæé
ããã¾ã§æ°åã«æ¸¡ã£ã¦InnoDB Pluginã®ã¨ã³ããªãæ¸ãã¦ããã®ã§ãInnoDB Pluginã試ãã¦ã¿ãããªã£ãã¨ããæ¹ãããããããã¾ããããããã§æ¬æ¥ã¯ãã®ãããªæ¹ããããã¨ãæå¾ ãã¦ãInnoDB Pluginãçµã¿è¾¼ãã MySQLã®ç°¡åãªãã«ãæé ããç´¹ä»ãã¾ããæ¬æé ã«ã¯ä»¥ä¸ã®ãããªç¹é·ãããã¾ãã
- MySQLã®é·ãconfigureãªãã·ã§ã³ãè¦ããªãã¦ãããã¨ãããMySQLãä½ãªã®ãç¥ããªãã¦ãã§ããã¬ãã«
- RPMãã§ããã®ã§ã¤ã³ã¹ãã¼ã«/ã¢ã³ã¤ã³ã¹ãã¼ã«ãç°¡åã試ãã¦ã¿ã¦é£½ãããã¢ã³ã¤ã³ã¹ãã¼ã«å¯è½
- ä»å¾ãã¼ã¸ã§ã³ãä¸ãã£ã¦ãããããæé ã¯å¤ãããªã
- ã³ããã§ãï½
対象OSã¯Red Hat Enterprise Linux 5ã¨CentOS 5ã§ãã
ä¸è¬ã¦ã¼ã¶ã§rpmbuidã³ãã³ãã使ããããã«ãã(ååã®ã¿)
$ cd $ echo "%_topdir $HOME/rpmbuild" > .rpmmacros $ mkdir rpmbuild $ cd rpmbuild $ mkdir BUILD RPMS SOURCES SPECS SRPMS
ä¸è¬ã¦ã¼ã¶ã§rpmbuildã³ãã³ãã使ããããã«ãè¨å®ãã¡ã¤ã«ã¨ä½æ¥ç¨ãã£ã¬ã¯ããªãä½æãã¾ãããªãä¸è¬ã¦ã¼ã¶ã§ãã«ãããã®ãã¨ããã¨ãMySQLã«ã¯rootã§ãã«ãããã¨make testã«å ¨é¨å¤±æããã¨ããã¡ãã£ã¨ããç½ ãããããã§ãã
MySQL Community Serverã®Source RPMã¨InnoDB Pluginã®ã½ã¼ã¹ããã¦ã³ãã¼ããã
$ cd $ wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-community-5.1.36-0.rhel5.src.rpm/from/http://ftp.iij.ad.jp/pub/db/mysql/ $ wget http://www.innodb.com/download/innodb_plugin/innodb_plugin-1.0.3.tar.gz
Source RPMãã¤ã³ã¹ãã¼ã«ãã
$ cd $ rpm -ivh MySQL-community-5.1.36-0.rhel5.src.rpm
ã½ã¼ã¹ãå±éãã
$ cd ~/rpmbuild/SPECS $ rpmbuild -bp --define 'community 1' mysql-5.1.36.rhel5.spec
ã¡ãªã¿ã«--define 'enterprise_commercial_advanced 1'ã¨ããã¨ãåç¨çã¨åããã®ãä½ãã¾ããè±ç¥èã
InnoDBã®ã½ã¼ã¹ãInnoDB Pluginã®ãã®ã«å·®ãæ¿ãã
$ cd ~/rpmbuild/BUILD/mysql-5.1.36/storage $ rm -rf innobase $ tar xvzf ~/innodb_plugin-1.0.3.tar.gz $ mv innodb_plugin-1.0.3 innobase
ã½ã¼ã¹ãã¢ã¼ã«ã¤ããã
$ cd ~/rpmbuild/BUILD $ tar cvzf ../SOURCES/mysql-5.1.36.tar.gz mysql-5.1.36
BUILDãã£ã¬ã¯ããªä»¥ä¸ãå¤æ´ããã ãã§ã¯æ¬¡åã®rpmbuildã³ãã³ãã§åã³ä¸æ¸ãããã¦ãã¾ããããå ã®ã¢ã¼ã«ã¤ããæ´æ°ãã¦ããã¾ãã
SPECãã¡ã¤ã«ãç·¨éãã
$ cd ~/rpmbuild/SPECS $ vi mysql-5.1.36.rhel5.spec
%if %{community} %define server_suffix -community-plugin %define package_suffix -community-plugin
ãã«ããã¦ã§ããRPMããªãªã¸ãã«ã®ãã®ã¨åºå¥ã§ããããã«ãserver_suffixã¨package_suffixãå¤æ´ãã¦ããã¾ãã
ãã«ããã
$ cd ~/rpmbuild/SPECS $ export MYSQL_RPMBUILD_TEST=no $ rpmbuild -bb --define 'community 1' mysql-5.1.36.rhel5.spec
ããã§MYSQL_RPMBUILD_TESTã«noãè¨å®ãã¦ããã¨ãmake testãã¹ããããããã¨ãã§ãã¾ããMySQLã®make testã¯æ°æéããããããã©ããã¦ãå¾ ã¦ãªãå ´åã¯ãã®ç°å¢å¤æ°ãè¨å®ãã¦ãã ããã
å®æï¼
$ cd ~/rpmbuild/RPMS/i386 $ ls MySQL-client-community-plugin-5.1.36-0.rhel5.i386.rpm MySQL-community-plugin-debuginfo-5.1.36-0.rhel5.i386.rpm MySQL-devel-community-plugin-5.1.36-0.rhel5.i386.rpm MySQL-embedded-community-plugin-5.1.36-0.rhel5.i386.rpm MySQL-server-community-plugin-5.1.36-0.rhel5.i386.rpm MySQL-shared-community-plugin-5.1.36-0.rhel5.i386.rpm MySQL-test-community-plugin-5.1.36-0.rhel5.i386.rpm
ããç°¡åã§ãããï¼
ãã«ãã§ãããã以ä¸ã«ç¤ºããããªInnoDB Pluginã®æ°æ©è½ããã²è©¦ãã¦ã¿ã¦ãã ããã