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