linux下面安裝coreseek與mmseg

1
tar xzvf coreseek-3.2.14.tar.gz
2
cd mmseg-3.2.14/
./configure --prefix=/usr/local/mmseg3css

checking for vfprintf... yes
checking for waitpid... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: error: cannot find input file: src/Makefile.in
3配置mmseg插件時,將出現Makefile錯誤
能夠經過安裝automake和autoconf
而後運行下面的代碼
apt-get install yum
yum -y install libtool
aclocal
libtoolize --force
automake --add-missing
autoconf
autoheader
make clean
上述完成以後,從新運行
./configure --prefix=/usr/local/mmseg3
會出現以下界面
Configuration:mysql

Source code location: .
Compiler: gcc
Compiler flags: -g -O2
Host System Type: x86_64-unknown-linux-gnu
Install path: /usr/local/mmseg3linux

See config.h for further configuration information.
4安裝
make && make install
將會出現以下界面
----------------------------------------------------------------------
test -z "/usr/local/mmseg3/bin" || /bin/mkdir -p "/usr/local/mmseg3/bin"
/bin/bash ../libtool --mode=install /usr/bin/install -c mmseg '/usr/local/mmseg3/bin'
libtool: install: /usr/bin/install -c mmseg /usr/local/mmseg3/bin/mmseg
test -z "/usr/local/mmseg3/include/mmseg" || /bin/mkdir -p "/usr/local/mmseg3/include/mmseg"
/usr/bin/install -c -m 644 css/ICorpusReader.h css/SegmenterManager.h css/tolowercase.h css/UnigramRecord.h css/mmthunk.h css/SegmentPkg.h css/UnigramCorpusReader.h css/Segmenter.h css/SynonymsDict.h css/UnigramDict.h utils/csr_mmap.h utils/darts.h utils/scoped_ptr.h utils/Utf8_16.h utils/csr_assert.h utils/csr_pool.h utils/freelist.h utils/Singleton.h utils/csr.h utils/csr_utils.h utils/os.h utils/StringTokenizer.h csr_typedefs.h css/ThesaurusDict.h iniparser/dictionary.h iniparser/iniparser.h utils/bsd_getopt.h utils/bsd_getopt_win.h '/usr/local/mmseg3/include/mmseg'
make[2]: Leaving directory `/home/coreseek-3.2.14/mmseg-3.2.14/src'
make[1]: Leaving directory `/home/coreseek-3.2.14/mmseg-3.2.14/src'
make[1]: Entering directory `/home/coreseek-3.2.14/mmseg-3.2.14'
make[2]: Entering directory `/home/coreseek-3.2.14/mmseg-3.2.14'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/mmseg3/etc" || /bin/mkdir -p "/usr/local/mmseg3/etc"
/usr/bin/install -c data/unigram.txt data/uni.lib data/mmseg.ini '/usr/local/mmseg3/etc'
以上完成mmseg安裝
五、安裝coreseek3.2.14
ln -s /usr/local/mmseg3/bin/mmseg /bin/mmseg
cd csft-3.2.14/
./configure --prefix=/usr/local/coreseek --without-unixodbc --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql
運行成功,會出現
generating configuration files
------------------------------sql

configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating libstemmer_c/Makefile
config.status: creating sphinx.conf.dist
config.status: creating sphinx-min.conf.dist
config.status: creating config/config.h
config.status: executing depfiles commands數據庫

configuration done
六、make && make install
安裝結束,會出現如下界面
test -z "/usr/local/coreseek/etc" || /bin/mkdir -p "/usr/local/coreseek/etc"
/usr/bin/install -c -m 644 sphinx.conf.dist sphinx-min.conf.dist example.sql '/usr/local/coreseek/etc'
make install-data-hook
make[3]: Entering directory `/home/coreseek-3.2.14/csft-3.2.14'
mkdir -p /usr/local/coreseek/var/data && mkdir -p /usr/local/coreseek/var/log
make[3]: Leaving directory `/home/coreseek-3.2.14/csft-3.2.14'
make[2]: Leaving directory `/home/coreseek-3.2.14/csft-3.2.14'
make[1]: Leaving directory `/home/coreseek-3.2.14/csft-3.2.14'
七、至此,MMSEG和Coreseek3.2.14就安裝完成了
ls /usr/local/coreseek/
bin etc var
八、測試
一、查看自帶測試數據
cd testpack
cat var/test/test.xml
coreseek-3.2.14/testpack# /usr/local/mmseg3/bin/mmseg -d /usr/local/mmseg3/etc/ var/test/test.xml
這部分指的是使用MMSEG建立中文詞條,並保存到Sphinx數據庫中
ln -s /alidata/server/mysql/lib/libmysqlclient.so.16 /usr/lib/libmysqlclient.so.16
/usr/local/coreseek/bin/indexer -c etc/csft.conf -all
結果
root@AY1405291839081862d9Z:/home/coreseek-3.2.14/testpack# /usr/local/coreseek/bin/indexer -c etc/csft.conf -all
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
Copyright (c) 2007-2011,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)bash

using config file 'etc/csft.conf'...
WARNING: no such index '-all', skipping.
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg測試

相關文章
相關標籤/搜索