[1]centos 安装依赖包
yum install make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel
[2] 安装mysql数据源依赖包
yum install mysql-devel libxml2-devel expat-devel
[3] 下载安装包,并安装
$ 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 ##安装mmseg中文分词 $ cd mmseg-3.2.14 $ ./bootstrap #输出的warning信息可以忽略,如果出现error则需要解决 $ ./configure --prefix=/usr/local/mmseg3 $ make && make install $ cd .. ##安装coreseek $ cd csft-3.2.14 $ sh buildconf.sh #输出的warning信息可以忽略,如果出现error则需要解决 $ ./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg=/usr/local/mmseg3 --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql=/usr/local/mysql --with-mysql-includes=/usr/local/mysql/include/mysql/ --with-mysql-libs=/usr/local/mysql/lib/mysql/ ##如果提示mysql问题,可以查看MySQL数据源安装说明 $ make && make install $ cd ..
[4] 主要记录的是,出现错误的情况
/data0/software/coreseek-3.2.14/csft-3.2.14/src/sphinx.cpp:4764: undefined reference to `libiconv' libsphinx.a(sphinx.o): In function `CSphTokenizer_zh_CN_UTF8_Private::GetConverterOutput(char const*, char const*)': /data0/software/coreseek-3.2.14/csft-3.2.14/src/tokenizer_zhcn.h:86: undefined reference to `libiconv_open' /data0/software/coreseek-3.2.14/csft-3.2.14/src/tokenizer_zhcn.h:89: undefined reference to `libiconv' libsphinx.a(sphinx.o): In function `xmlUnknownEncoding': /data0/software/coreseek-3.2.14/csft-3.2.14/src/sphinx.cpp:20719: undefined reference to `libiconv_open' /data0/software/coreseek-3.2.14/csft-3.2.14/src/sphinx.cpp:20737: undefined reference to `libiconv' /data0/software/coreseek-3.2.14/csft-3.2.14/src/sphinx.cpp:20743: undefined reference to `libiconv_close' libsphinx.a(sphinx.o): In function `CSphTokenizer_zh_CN_GBK::SetBuffer(unsigned char*, int)': /data0/software/coreseek-3.2.14/csft-3.2.14/src/sphinx.cpp:4792: undefined reference to `libiconv' libsphinx.a(sphinx.o): In function `CSphTokenizer_zh_CN_UTF8_Private::GetConverter(char const*, char const*)': /data0/software/coreseek-3.2.14/csft-3.2.14/src/tokenizer_zhcn.h:70: undefined reference to `libiconv_open' /data0/software/coreseek-3.2.14/csft-3.2.14/src/tokenizer_zhcn.h:73: undefined reference to `libiconv' collect2: ld returned 1 exit status make[2]: *** [indexer] Error 1 make[2]: Leaving directory `/data0/software/coreseek-3.2.14/csft-3.2.14/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/data0/software/coreseek-3.2.14/csft-3.2.14/src' make: *** [all-recursive] Error 1
[5] ./configure之后,进入/src目录下,找到Makefile,用vi打开
将 LIBS = -lm -lexpat -L/usr/local/lib 改成 LIBS = -lm -lexpat -liconv -L/usr/local/lib
搞定,安装成功!