2012年5月9日水曜日

install Q4M on Fedora release 13

※this text from livedoor blog 2011/7/27

Fedora release 13でMySQL 5.1.56とQ4M 0.9.5をインストールします ライブラリをインストールしてMySQLスタート
yum install gcc-c++
yum -y install gperf
yum -y install readline-devel
yum -y install libtool
yum -y install time
yum -y install auto-buildrequires
yum -y install boost-devel
yum -y install mysql*

/etc/init.d/mysqld start
パスワード設定
/usr/bin/mysqladmin -u root password 'PASSWORD'
/usr/bin/mysqladmin -u root -h HOSTNAME.jp password 'PASSWORD'

mysql -uroot -pPASSWORD
MySQLのrpmとQ4Mをダウンロード
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-community-5.1.56-1.rhel5.src.rpm/from/http://ftp.jaist.ac.jp/pub/mysql/
wget http://q4m.31tools.com/dist/q4m-0.9.5.tar.gz  
tar zxfv q4m-0.9.5.tar.gz  
MySQLのrpmをリビルド ※長時間必要
rpmbuild --recompile --define 'community 1' MySQL-community-5.1.56-1.rhel5.src.rpm
Q4Mのインストール
cd ./q4m-0.9.5
./configure --with-mysql=/root/rpmbuild/BUILD/mysql-5.1.56
make
make install
/usr/bin/install -c support-files/q4m-forward /usr/bin
mysql -u root -pPASSWORD -f mysql < support-files/install.sql
プラグインにQUEUEがある事を確認
/etc/init.d/mysqld restart
mysql -uroot -pPASSWORD
mysql> show plugins;
+------------+--------+----------------+--------------------+---------+
| Name       | Status | Type           | Library            | License |
+------------+--------+----------------+--------------------+---------+
| binlog     | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| partition  | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| CSV        | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| MEMORY     | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| InnoDB     | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| MyISAM     | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL               | GPL     |
| QUEUE      | ACTIVE | STORAGE ENGINE | libqueue_engine.so | GPL     |
+------------+--------+----------------+--------------------+---------+
8 rows in set (0.00 sec)