Sphinx安装(For MySQL) LINUX

下载地址

wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.22.tar.gz/from/http://mysql.isu.edu.tw/

下载mysql-5.1.22-rc.tar.gz解压至/root/mysql-5.1.22
下载sphinx-0.9.8-svn-r985.tar.gz,解压至/root/sphinx-0.9.8-svn-r985
将/root/sphinx-0.9.8-svn-r985/mysqlse下的文件复制至/root/mysql-5.1.22/storage/sphinx
在/root/mysql-5.1.22目录下运行

sh BUILD/autorun.sh
./configure --prefix=/usr/local/mysql --with-charset=utf8 --with-extra-charsets=all  \
--enable-thread-safe-client --enable-assembler --with-readline --with-big-tables \
--with-plugins=sphinx
make && make install
groupadd mysql
useradd -g mysql mysql
chown mysql:mysql /usr/local/mysql -R
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
(此时系统可能会提示:
[Warning] Storage engine 'SPHINX' has conflicting typecode. Assigning value 42.
可忽略,不影响使用)
cp /root/mysql-5.1.22/support-files/mysql.server /etc/init.d/mysqld
chmod 700 /etc/init.d/mysqld
cp /root/mysql-5.1.22/support-files/my-medium.cnf /etc/my.cnf
/etc/init.d/mysql start
(至些mysql启动了)

然后进入mysql命令行,运行show engines,看是不是有一个叫sphinx的engine,有的话就表示sphinxSE(mysql的sphinx引擎)安装正常了

进入/root/sphinx-0.9.8-svn-r985,运行

ldconfig /usr/local/mysql/lib/mysql
ldconfig /usr/local/mysql/include/mysql
./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql
make && make install

以上内容在mysql-5.1.26rc上测试成功。 在mysql-5.1.30上测试失败。

上一篇: 解决mmseg的编译问题   下一篇: discuz 数据表对照

提交疑问

回顶部