Ubuntu12.04 install coreseek 4.1 beta (for conversion)

Source: Internet
Author: User
Tags locale
Install coreseek 12.04 beta in Ubuntu 4.1 Coreseek install software to be preinstalled:

Shell> apt-Get install make GCC g ++ automake libtool M4 Autoconf mysql-client libmysqlclient15-dev libxml2-dev libexpat1-dev

 

# Switch to the root user and ensure that you have full permissions to install the software

$ Su Root

 

$ Coreseek-4.1-beta CD

 

# Chinese test environment check:

$ Locale

# The following is the core item, locale for the zh_CN.UTF-8, You can normally display and enter Chinese;

# If the Chinese character cannot be displayed normally, the subsequent Chinese Character Test Section cannot proceed normally, but does not affect the actual function of coreseek;

Lang = zh_CN.UTF-8

Lc_all = "zh_CN.UTF-8"

 

# Make sure that the display can be normal, otherwise check the locale configuration of the current environment, and the current environment or client has been set to support UTF-8 Chinese Character Display

$ Cat testpack/var/test. xml

 

# Install the mmseg developed by coreseek to provide the Chinese word segmentation function for coreseek

$ Mmseg-3.2.14 CD

# In ubuntu, use aclocal_flags = "-I/usr/share/aclocal"./Bootstrap

$./Bootstrap

$./Configure -- prefix =/usr/local/mmseg3

$ Make & make install

# If libtool: Unrecognized option '-- tag = CC' is displayed, view the libtool solution.

# After the installation is complete, the dictionary and configuration file used by mmseg will be automatically installed in/usr/local/mmseg3/etc

 

# Chinese Word Segmentation test, the display is not normal, please check the locale and UTF-8 Chinese character display settings in the current environment

$/Usr/local/mmseg3/bin/mmseg-D/usr/local/mmseg3/etc src/t1.txt

Chinese/X points/X words/X tests/x

Chinese/X Shanghai/x

Word splite took: 1 ms.

# Install coreseek:

# Execute configure for compilation and Configuration:

$ Sh buildconf. Sh

$. /Configure -- prefix =/usr/local/coreseek -- without-Python -- without-unixodbc -- With-mmseg-eclipdes =/usr/local/mmseg3/include/mmseg /-- With-mmseg-libs =/usr/local/mmseg3/lib/-- With-MySQL


$ Make & make install

 

If a compilation error occurs, the following error occurs:

make[2]: *** [sphinxexpr.o] Error 1make[2]: Leaving directory `/home/mac/Downloads/coreseek-4.1-beta/csft-4.1/src‘make[1]: *** [all] Error 2make[1]: Leaving directory `/home/mac/Downloads/coreseek-4.1-beta/csft-4.1/src‘make: *** [all-recursive] Error 1
To solve the problem, you need to apply a patch:


A useful link: http://bugs.debian.org/cgi-bin/bugreport.cgi? Bug = 667378 is the same issue with sphek on the upstream of coreseek. After reading it, it seems that the C ++ scope of GCC 4.7 is a problem, the above Debian bugs provides a patch. After reading the patch content, it also makes the same patch for its local coreseek. The compressed package is released as follows. Note the version: sphinxexpr.cpp.patch.zip


[Email protected]:/home/China/downloads/coreseek-4.1-beta/csft-4.1 # patch-P1 Can't find file to patch at input line 3
Perhaps you used the wrong-P or -- strip option?
The text leading up to this was:
--------------------------
| ---/Home/China/downloads/coreseek-4.1-beta/csft-4.1/src/sphinxexpr. cpp 2011-10-07 20:08:58. 000000000 + 0800
| ++ Sphinxexpr. cpp 13:47:35. 237820912 + 0800 QQ: 327168521
--------------------------
File to patch:

In file to patch: after entering the position of the sphinxexpr. cpp file, I entered/home/China/downloads/coreseek-4.1-beta/csft-4.1/src/sphinxexpr. cpp

After the patch is installed, you can directly compile it.



# Configure the test to test whether the test runs correctly

$/Usr/local/coreseek/bin/indexer-C/usr/local/coreseek/etc/sphinx-min.conf.dist

# The following message is displayed during normal testing:

Coreseek Fulltext 4.1 [sph1_2.0.2-Dev (r2922)]
Copyright (c) 2007-2011,
Beijing choice Software Technologies Inc (http://www.coreseek.com)

Error: nothing to do.

 

# Now, The coreseek basic environment is properly installed



$ CD testpack

 

$/Usr/local/coreseek/bin/indexer-c etc/CSFT. conf -- all

 

$/Usr/local/coreseek/bin/search-c etc/CSFT. conf-a service

##The following is a normal test search:Keyword "service" Data

Coreseek Fulltext 4.1 [sph1_2.0.2-Dev (r2922)]

Copyright (c) 2007-2011,

Beijing choice Software Technologies Inc (http://www.coreseek.com)

 

Using config file 'etc/CSFT. conf '...

Index 'xml': Query 'service': returned 1 matches of 1 Total in 0.015 Sec

 

Displaying matches:

1. Document = 3, Weight = 1, published = wed Mar 31 21:01:00 2010, author_id = 2

 

Words:

1. 'service': 1 Documents, 1 hits

$/Usr/local/coreseek/bin/searchd-c etc/CSFT. conf

# The following is the prompt when the search service is enabled normally: (csft-4.0 version is similar)

Coreseek Fulltext 4.1 [sph1_2.0.2-Dev (r2922)]

Copyright (c) 2007-2010,

Beijing choice Software Technologies Inc (http://www.coreseek.com)

 

Using config file 'etc/CSFT. conf '...

Listening on all interfaces, Port = 9312

##To stop the search service,/Usr/local/coreseek/bin/searchd-c etc/CSFT. conf -- stop

##To enable the Service, update the index,/Usr/local/coreseek/bin/indexer-c etc/CSFT. conf -- all -- rotate

 

# Then, please refer to the relevant files in the csft-4.1 API directory, use PHP, Python, Ruby, Java to test the search service; you can also go to <a href = "/products-install/step_by_step/"> Search for the service to create a three-step tutorial. Check that step 3 is tested using PHP.


The article references and passes the test by myself: Success

Thanks to the original author of this article from http://blog.csdn.net/whzhcahzxh/article/details/17533143

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.