Ubuntu Coreseek安装配置

一切按照官方的说明文档来安装,但到最好配置时却老配置老出错。最终只能再google一下,按下面的配置才算搞定。刚玩coreseek,对一些参数还不是很熟悉,,但又想配置起来玩下,没有好好地看官方说明文档呵呵。

防止出现编译错误,先安装以下程序yum -y install mysql mysql-devel php-mysql qt4-mysql python python-dev gcc-c++ gtk+ libtool automake autoconf glibc-common expat-devel

1、安装wget ####coreseek源文件wget #####coreseek所使用的词典tar zxvf csft-3.1.tar.gztar zxvf mmseg-3.1.tar.gz

#####在安装coreseek前必须先安装mmsegcd mmseg-3.1./configure –prefix=/usr/local/mmsegmakemake install

######## 安装coreseek ##########这里不使用python数据源,若需要,请加上 –with-python,在mmseg上一定要对应路径./configure –prefix=/usr/local/coreseek –with-mmseg-includes=/usr/local/mmseg/include/mmseg –with-mmseg-libs=/usr/local/mmseg/lib –without-iconv

指定–enable-id64选项会打开64位文档ID和词ID的支

makemake install

若无问题,安装完毕后在/usr/local/下生成 coreseek目录及其下文件。

接下来要生成 mmseg词库及配置文件:cd /usr/loca/mmseg/usr/local/mmseg/bin/mmseg -u /usr/local/src/mmseg-3.1/data/unigram.txt ###unigram.txt是对应的词典文件,将会生成unigram.txt.unicd ../coreseekmkdir dict ###创建字典目录cp /usr/local/src/mmseg-3.1/data/unigram.txt.uni dict/uni.lib ###把创建的词典复制到dictvim dict/mmseg.ini ####创建mmseg的配置文件,此文件在coreseek的windows版本已自带!

mmseg.ini:[mmseg]merge_number_and_ascii=1;number_and_ascii_joint=-;compress_space=0;seperate_number_ascii=1;至此,mmseg配置完毕!下一步配置csft.conf——coreseek的配置文件

source article{type = mysqlsql_host = localhostsql_user = rootsql_pass = jiaxiansql_db = testsql_port = 3306 # optional, default is 3306

sql_query_pre = SET NAMES utf8#sql_query_pre = SET SESSION query_cache_type=OFF ##这个可以关闭sql查询缓存#sql_query = SELECT id, classid, checked, title, newstime, newstext FROM articlesql_query_range = SELECT MIN(id),MAX(id) FROM articlesql_range_step = 1000sql_query = SELECT id, classid, checked, title, newstime, newstext FROM article WHERE id>=$start AND id<=$end

sql_attr_uint = classidsql_attr_uint = checkedsql_attr_uint = newstimesql_query_info = select * from article where id=$id

}

index article{source = articlepath = /usr/local/coreseek/var/data/articledocinfo = externcharset_type = zh_cn.utf-8 ###指定coreseek的编码charset_dictpath = /usr/local/coreseek/dict #####coreseek字典文件

min_prefix_len = 0min_infix_len = 0min_word_len = 2ngram_len = 1ngram_chars = U+4E00..U+9FBF, U+3400..U+4DBF, U+20000..U+2A6DF, U+F900..U+FAFF,\U+2F800..U+2FA1F, U+2E80..U+2EFF, U+2F00..U+2FDF, U+3100..U+312F, U+31A0..U+31BF,\U+3040..U+309F, U+30A0..U+30FF, U+31F0..U+31FF, U+AC00..U+D7AF, U+1100..U+11FF,\U+3130..U+318F, U+A000..U+A48F, U+A490..U+A4CFhtml_strip = 0}

indexer{mem_limit = 256M}searchd{# address = 0.0.0.0log = /usr/local/coreseek/var/log/searchd.logquery_log = /usr/local/coreseek/var/log/query.logread_timeout = 5max_children = 30pid_file = /usr/local/coreseek/var/log/searchd.pidmax_matches = 1000seamless_rotate = 1}

我不去想是否能够成功,既然选择了远方,便只顾风雨兼程!

Ubuntu Coreseek安装配置

相关文章:

你感兴趣的文章:

标签云: