> CentOS > CentOS教程 >

CentOS7下安装coreseek

yum install expat-devel* 

cd /usr/local/src

wget http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.14.tar.gz

tar xzvf coreseek-3.2.14.tar.gz

cd coreseek-3.2.14

cd mmseg-3.2.14

./bootstrap

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

make && make install

cd ..

cd csft-3.2.14

wget -O - http://blog.atime.me/static/resource/sphinxexpr-gcc4.7.patch.gz | gzip -d - | patch -p0
或者
直接修改src/sphixexpr.cpp文件的1746, 1777和1823行,将三行中的ExprEval改为this->ExprEval
参考http://blog.atime.me/note/sphinx-coreseek-summary.html

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

cd ..

cd testpack

cat var/test/test.xml    #此时应该正确显示中文

/usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc var/test/test.xml

/usr/local/coreseek/bin/indexer -c etc/csft.conf --all

/usr/local/coreseek/bin/search -c etc/csft.conf 网络搜索

正常开启搜索服务
/usr/local/coreseek/bin/searchd -c etc/csft.conf

如要停止搜索服务,请使用
/usr/local/coreseek/bin/searchd -c etc/csft.conf --stop

如要已启动服务,要更新索引,请使用
/usr/local/coreseek/bin/indexer -c etc/csft.conf --all --rotate

mysql数据源的配置可参考testpack/etc/csft_mysql.conf文件 

(责任编辑:IT)