ubuntu下 mysql5.6.4 +sphinx安装

安装mysql 5.6.4

下载源码

安装cmake

sudo apt-get install cmake

进入mysql源码包:

ubuntu下 mysql5.6.4 +sphinx安装
创建mysql用户与用户组
groupadd mysql
useradd mysql -g mysql

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLE_DOWNLOADS=1 -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock -DMYSQL_USER=mysql

make
make install

cp /usr/local/mysql/support-files/my-huge.cnf   /etc/my.cnf

chown -R mysql:mysql /usr/local/mysql
chown mysql:mysql   /etc/my.cnf
ubuntu下 mysql5.6.4 +sphinx安装

 

下载coreseek(sphinx的改进版,内置了mmseg分词)

安装mmseg:

cd mmseg-3.2.14

./configure --prefix=/usr/local/mmseg

如果出现:

config.status: WARNING:  ‘Makefile.in‘ seems to ignore the --datarootdir setting
config.status: error: cannot find input file: src/Makefile.in

则需要执行:

ubuntu下 mysql5.6.4 +sphinx安装
sudo apt-get install libtool
aclocal
libtoolize --force
automake --add-missing
autoconf
autoheader
make clean
ubuntu下 mysql5.6.4 +sphinx安装

安装sphinx

ubuntu下 mysql5.6.4 +sphinx安装
cd cd ../csft-4.1/
./configure --prefix=/usr/local/sphinx --with-mmseg=/usr/local/mmseg --with-mmseg-includes=/usr/local/mmseg/include/mmseg --with-mmseg-libs=/usr/local/mmseg/lib --with-mysql=/usr/local/mysql55 --with-mysql-includes=/usr/local/mysql55/include --with-mysql-libs=/usr/local/mysql55/lib
ubuntu下 mysql5.6.4 +sphinx安装

 

修改配置文件

生成索引

搜索测试

 

 

 

ubuntu下 mysql5.6.4 +sphinx安装,布布扣,bubuko.com

ubuntu下 mysql5.6.4 +sphinx安装

上一篇:Windows配置jdk环境安装教程


下一篇:第二次SQLServer试验解