Main Reference Document: Http://www.coreseek.cn/products-install/install_on_bsd_linux/One
32-bit version:
Coreseek installation requires pre-installed software:apt-get Install make gcc g++ automake libtool mysql-client libmysqlclient15-dev libxml2-dev Libexpat1-dev Second,Coreseek Quick Installation:before installation, it is recommended to review: Source Package Description readme;4.0/4.1 version can refer to version 3.2 installation, the same steps, if you encounter problems, please see detailed installation instructions. # #下载coreseek: Coreseek 3.2.14: Click to download, Coreseek 4.0.1: Click to download, Coreseek 4.1: click to download$ wget http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.14.tar.gz$ or http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.0.1-beta.tar.gz$ or http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.1-beta.tar.gz$ tar xzvf coreseek-3.2.14.tar.gz or coreseek-4.0.1-beta.tar.gz or coreseek-4.1-beta.tar.gz$ cd coreseek-3.2.14 or Coreseek-4.0.1-beta or Coreseek-4.1-beta # #前提: Pre-installed operating system base Development library and MySQL dependent library to support MySQL data source and XML data source# #安装mmseg$ cd mmseg-3.2.14$./bootstrap #输出的warning信息可以忽略, if error occurs, you need to resolve$./configure--prefix=/usr/local/mmseg3$ make && make install$ CD.# #安装coreseek$ cd csft-3.2.14 or CD csft-4.0.1 or CD csft-4.1$ sh buildconf.sh #输出的warning信息可以忽略, if error occurs you need to resolve$./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 # #如果提示mysql问题, you can view the MySQL data source installation Instructions
Errors that may occur during the previous installation: Configuring Sphinx------------------Checking for CFLAGS needed for pthreads ...-pthreadchecking for LIB S needed for pthreads ...-lpthreadchecking for pthreads ... foundchecking whether to compile with MySQL support ... Yescheck ing for mysql_config ... not foundchecking mysql include files ... configure:error:missing include files.***************** Error:cannot find MySQL include files. Check that the do has MySQL include files installed. The package name is typically ' Mysql-devel '. If include files is installed on your system, but is still gettingthis message, you should do one of the following:1 ) either specify includes location explicitly, using--with-mysql-includes;2) or specify MySQL installation root location explicitly, using--with-mysql;3) or make sure this path to ' Mysql_config ' program is listed in your path environment variable. To disable MySQL support, use--without-mysql Option.****************************************************************************** Solution execution: Apt-get updateapt-get install libmysqlclient15-dev
$ make && make install$ CD.# #测试mmseg分词, Coreseek search (requires a pre-set character set of ZH_CN. UTF-8, make sure Chinese is displayed correctly)$ 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 web searchThe installation test is complete. View version Information$/usr/local/coreseek/bin/indexer-c etc/csft.conf--all# #如要停止搜索服务, please use/usr/local/coreseek/bin/searchd-c/usr/local/coreseek/etc/csft_mysql.conf--stopIf the following error occurs:coreseek fulltext 3.2 [Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2011,Beijing Choice Software Technologies Inc (http://www.coreseek.com)using config file '/usr/local/coreseek/etc/mysql_csft.conf ' ...fatal:failed to parse config file '/usr/local/coreseek/etc/mysql_csft.conf 'Workaround:/usr/local/coreseek/bin/searchd-c/usr/local/coreseek/etc/csft_mysql.conf--pidfile Start-up service:/usr/local/coreseek/bin/ Searchd-c/usr/local/coreseek/etc/csft_mysql.conf--console# #如要已启动服务, to update your index, use the/usr/local/coreseek/bin/indexer-c etc/csft.conf--all--rotate Build Index/usr/local/coreseek/bin/indexer-c/usr/local/coreseek/etc/csft_mysql.conf--allcoreseek fulltext 3.2 [Sphinx 0.9.9-release (r2117)]Copyright (c) 2007-2011,Beijing Choice Software Technologies Inc (http://www.coreseek.com)using config file '/usr/local/coreseek/etc/csft_mysql.conf ' ...indexing index ' mysql ' ...collected 3 docs, 0.0 MBsorted 0.0 mhits, 100.0% doneTotal 3 docs, 7545 bytesTotal 0.018 sec, 416069 bytes/sec, 165.43 docs/secTotal 2 Reads, 0.000 sec, 4.2 kb/call avg, 0.0 msec/call avgTotal 7 writes, 0.000 sec, 3.1 kb/call avg, 0.0 msec/call avgSearch/usr/local/coreseek/bin/search-c/usr/local/coreseek/etc/csft_mysql.conf Baidu acquisition using PHP in conjunction with:require ("sphinxapi.php");$SPH = new Sphinxclient ();$SPH-Setserver (' 10.2.6.101 ', 9312);Setmatchmode, $SPH (sph_match_any);//$SPH-Setarrayresult (true);$SPH-setlimits (0, +);$SPH-Setmaxquerytime ();$index = ' index_main1 ';$dbname = ' Test ';$table = ' documents ';$result = $sph->query ($wd, $index);if ($result = = False){echo ' <pre> ';Var_dump ($SPH->getlasterror ()); exit ();} if (isset ($result [' Total_found ']) && $result [' Total_found ']>0]{$matches = $result [' matches '];$keys = Array_keys ($matches);include ' minimysql.php ';$db = new Minimysql (' host ' = ' localhost ', ' user ' = ' root ', ' pwd ' = ' root ', ' dbname ' = ' = ', ' Prefix ' = ' mj_ '));$list = $db getarray (' SELECT id,title,content from '. $table. ' ' WHERE ID in ('. Implode (', ', $keys) ');$html = Array ();$keys = Array_flip ($keys);$opts = Array (' before_match ' = ' <font style=\ ' font-weight:bold;color:red\ ' > ',' after_match ' = ' </font> ',' limit ', );foreach ($list as $key = $val) {$tmp = $sph->buildexcerpts ($val, ' index_main1 ', $WD, $opts);$html [$keys [$val [' ID ' ]] =' <div> '.' <a href= ' "title=" "target=" ">" $tmp [' 1 ']. ' </a> '.' <p class= ' brief ' > '. $tmp [' 2 ']. ' </p> '.' </div> ';//$html [] = $html [$keys [$val [' id ']] = ' <div><a href= "" title= "" target= "" > ". $val [' title ']. ' </a></div> '; }Ksort ($html);Echo Implode (', $html);}Else{Echo ';exit ();}
ubuntu-10.04 test Environment Installation Test Coreseek Open source Chinese search engine-sphinx Chinese version