DrizzleをFreeBSDにインストールしてみた
Drizzleプロジェクトの目指すもの、その先を読む(1/3) − @IT
Drizzleの最新バージョンのリリースのアナウンスが出たので,
http://blog.drizzle.org/2009/12/22/drizzle-build-1251-source-tarball-has-been-released/
FreeBSDにインストールしてみました.
Linuxにインストールする場合と比べて,いくつか準備が要ります.
まずlibprotobufが必要です.Google Codeからダウンロードしてインストールします.
GitHub - protocolbuffers/protobuf: Protocol Buffers - Google's data interchange format
次にlibuuidも必要です.これはファイルシステムに関連していて,ソースからのインストールが面倒なので,FreeBSDの場合はsysinstallやpkg_addで,packageやportsから入れると簡単です.
FreeBSD Ports Search
それから,Drizzleのインストールのためには,libdrizzleが必要です.
ダウンロードしてインストールします.
Drizzle Client & Protocol Library in Launchpad
ここまでは,だいたいは./configureとgmakeで出来てしまいます.
やっとDrizzleをダウンロードして展開します.今回はbellです.
bell "bell" : Series trunk : Drizzle
configureのhelpを見ると,なかなかワクワクさせられます.プラグインのオプションを見ると,こんな感じです.
--with-archive-plugin Build Archive Storage Engine and enable it. --with-ascii-plugin Build UDF Plugin for ASCII and enable it. --with-auth-http-plugin Build HTTP Authentication Plugin and enable it. --with-auth-pam-plugin Build PAM Authenication Plugin and enable it. --with-blackhole-plugin Build Blackhole Storage Engine and enable it. --with-charlength-plugin Build UDF Plugin for CharLength and enable it. --with-compression-plugin Build compression UDFs and enable it. --with-connection-id-plugin Build Connection ID UDF and enable it. --with-console-plugin Build Console Client and enable it. --with-csv-plugin Build CSV Storage Engine and enable it. --with-default-replicator-plugin Build Default Replicator and enable it --with-drizzle-protocol-plugin Build Drizzle Protocol Module and enable it. --with-memory-plugin Build Memory Storage Engine and enable it. --with-innobase-plugin Build InnoDB Storage Engine and enable it. --with-memcached-functions-plugin Build Memcached Client UDFs and enable it. --with-myisam-plugin Build MyISAM Storage Engine and enable it. --with-mysql-protocol-plugin Build MySQL Protocol Module and enable it.
MySQLでデフォルトで入っているエンジンは,ArchiveやMemoryのように若干マイナーなものでも,デフォルトはonになっているようです.
さて,準備をしていればconfigureは通るのですが,FreeBSD 7.2でコンパイルするには,2箇所だけソースの修正が必要でした.
- ./drizzled/message/binlog_encoding.h 58行目
if (ptr - buf > pow2) → if ((unsigned int)(ptr - buf) > pow2)
(符号付と符号無しの比較をしているよエラーで止まってしまうから)
- ./drizzled/drizzled.cc 19行目あたり,includeの先頭に追加
#include <sys/types.h>
(u_int32_t等の定義が無いよエラーで止まってしまうから)
gmakeすると,長い時間がかかって(そりゃPentium Mですから),コンパイルが終了します.
Drizzleを立ち上げます.
> mkdir /tmp/drizzle.data > drizzled --datadir=/tmp/drizzle.data --console-enable InnoDB: The InnoDB memory heap is disabled InnoDB: Neither mutexes nor rw_locks use GCC atomic builtins. InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 091223 20:14:25 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 091223 20:14:25 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 091223 20:14:25 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 091223 20:14:26 InnoDB Plugin 1.0.4 started; log sequence number 0 Listening on 0.0.0.0:3306 Listening on 0.0.0.0:4427 drizzled: Forcing close of thread 0 user: '' drizzled: ready for connections. Version: '2009.12.1251' Source distribution (drizzle) drizzled>
なんかInnoDBのDBファイルが出来た気配です...