既存のMySQLでsphinxSEをインストールする

892 ワード

1.該当するパッケージをダウンロード
(1)MySQLソースパッケージ
(2)sphinx-0.9.9.tar.gz
具体的な手順略(wget)
2.インストール
1  cd /opt/
2  tar -zxvf ./mysql-5.1.66.tar.gz 
3  tar -zxvf ./sphinx-0.9.9.tar.gz 
4  mysqladmin  -uroot -pPWD version 
5  cd /opt/
6  ls
7  cp -r ./sphinx-0.9.9/mysqlse/  ./mysql-5.1.66/storage/sphinx
8  cd ./mysql-5.1.66
9  sh BUILD/autorun.sh 
10  ./configure 
11  make
12  cp storage/sphinx/.libs/ha_sphinx.* /usr/lib/mysql/plugin
13  mysql -uroot -pPWD
   mysql> show engines;
   mysql> install plugin sphinx soname 'ha_sphinx.so';
下図のように成功しました
3.注意
(1)MySQLのソースコードのバージョンは必ずあなたがインストールしたMySQLのバージョンと一致しなければなりません.そうしないと
(2)使用:./configure --prefix=/usr/local/mysql(./configure )
使用しない:./configure--prefix=/usr/local/mysql--with-plugins=sphinx(どうせ使用しないでください--with-plugins=sphinx)
生成されたのはha_であることを覚えておいてください.sphinx.soはsphinxではありません.so