sh buildconf.sh
./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql
make && make install
php连接sphinx:
a. 安装扩展:
a-1. 进入目录:
cd ../csft-4.1/api/libsphinxclient/
a-2. 编译:
aclocal
libtoolize --force
automake --add-missing
autoconf
autoheader
make clean
./configure --prefix=/usr/local/sphinxclient
make && make install
a-3. 回到软件包目录:
cd ../../../../
a-4. 解压:
tar -xzf sphinx-1.3.0.tgz
a-5. 安装php-devel:
yum -y install php php-devel
a-6. 进入目录:
cd sphinx-1.3.0
a-7. 安装:
phpize
./configure --with-php-config=/usr/bin/php-config --with-sphinx=/usr/local/sphinxclient
make && make install
a-8. 开启php-sphinx扩展:
vim /etc/php.ini
在末尾加上:
[sphinx]
extension=sphinx.so
b. 测试:
b-1. 启动mariadb服务:
systemctl start mariadb
b-2. 添加测试数据:
mysql -uroot -p123456 < /usr/local/coreseek/etc/example.sql
b-3. 复制配置文件:
cp /usr/local/coreseek/etc/sphinx.conf.dist /usr/local/coreseek/etc/csft.conf
cp /home/lee/sphinx/coreseek-4.1-beta/mmseg-3.2.14/data/* /usr/local/mmseg3/etc/
b-4. 修改配置文件:
vim /usr/local/coreseek/etc/csft.conf