sphinx安装

下载coreseek-3.2.14.tar.gz
解压压缩包
$ cd coreseek-3.2.14/mmseg-3.2.14
$ ./configure --prefix=/usr/local/mmseg/
如果出现下面如下错误请执行, config.status: error: cannot find input file: src/Makefile.in,请执行
$ yum -y install autoconf automake
$ aclocal
$ yum -y install libtool
$ aclocal
$ libtoolize -f
$ automake –add-missing
$ autoconf
$ autoheader
$ make clean
$ ./configure --prefix=/usr/local/mmseg/
$ make
$ sudo make install 
到这里mmseg安装完毕,接下来安装coreseek,请看代码
$ cd ../ csft-3.2.14
$ ./configure --prefix=/usr/local/coreseek --with-mysql=/usr/local/mysql --with-mmseg-includes=/usr/local/mmseg/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg/lib/
$ make
$ make install
到这里还没有完毕,安装好coreseek和mmesg我们要给php加上sphinx模块,这样php就可以用到sphinx软件的功能,先下载php的sphinx模块包,代码如下
$ wget http://pecl.php.net/get/sphinx-1.1.0.tgz
$ tar zxvf sphinx-1.1.0.tgz
$ cd sphinx-1.1.0
$ /usr/local/php/bin/phpize
$ ./configure  --with-php-config=/usr/local/php/bin/php-config
此处报错
checking for libsphinxclient headers in default path... not found
configure: error: Cannot find libsphinxclient headers
找了下libsphinxclient,在coreseek-3.2.14/csft-3.2.14/api/libsphinxclient,进入该目录,重新编译
$ ./configure
$ make && make install
进入sphinx目录
$ cd sphinx-1.1.0
$ /usr/local/php/bin/phpize
$ ./configure --with-php-config=/usr/local/php/bin/php-config
$ make
$ make install
查看phpinfo,显示sphinx已经安装成功
wget http://sphinxsearch.com/files/sphinx-2.2.5-release.tar.gz
tar zxvf sphinx-2.2.5-release.tar.gz
cd sphinx-2.2.5-release
./configure -prefix=/usr/local/sphinx
make && make install

cd /usr/local/sphinx/etc
cp sphinx.conf.dist sphinx.conf
http://www.tuicool.com/articles/N3iQ7r
http://www.phperz.com/article/15/0611/120380.html
http://www.kuqin.com/shuoit/20141101/342963.html

猜你喜欢

转载自blog.csdn.net/zchare/article/details/51731974
今日推荐