Coreseeksphinxmmsegmysql full-text retrieval installation Configuration

Source: Internet
Author: User
Tags automake
The last full-text retrieval task has to be traced back to 2010. At that time, I thought coreseek was not mature and I used the original sphworkflow. For details, refer to sphinxmmsegmysql Chinese word segmentation, we decided to use coreseek to see the difference. 1. Download centos6.5x86coreseek4.0.1 from the installation environment and tool server

The last full-text retrieval task has to be traced back to 2010. At that time, I felt that coreseek was not mature and I used the original sphworkflow. For details, refer to: sphsf-mmseg mysql Chinese word segmentation. What about this time, we decided to use coreseek to see the difference. 1. The installation environment and tool server use centos6.5 x86 coreseek 4.0.1 to download

The last full-text retrieval task has to be traced back to 2010. At that time, I thought coreseek was not mature and I used the original sphek. For details, refer:Sphsf-mmseg mysql Chinese Word SegmentationThis time, we decided to use coreseek to see the difference.

I. installation environment and tools

The server uses centos6.5 x86

Coreseek 4.0.1: http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.0.1-beta.tar.gz

Mysql 5.5.8: http://downloads.mysql.com/archives/community/

Ii. mmseg Chinese Word Segmentation Installation

1. Old Version Installation Method

# tar zxvf coreseek-4.0.1-beta# cd coreseek-4.0.1-beta/mmseg-3.2.14/# aclocal# libtoolize --force# automake --add-missing# autoconf# autoheader# make clean# ./configure --prefix=/usr/local/mmseg3# make# make install

2. New Version Installation Method

# ./bootstrap# ./configure --prefix=/usr/local/mmseg3# make# make install

Mmseg-3.2.14, both methods can be installed successfully, there is a warning when compiling, but does not affect the installation.

3. After the new version of mmseg is installed, you can just split the word and do not use mmseg to generate it.

[Root @ localhost mmseg-3.2.14] # ll/usr/local/mmseg3/etc/total usage 5432-rwxr-xr-x 1 root 229 July 31 01:44 mmseg. ini-rwxr-xr-x 1 root 1826251 July 31 01:44 unigram.txt-rwxr-xr-x 1 root 3729280 July 31 01:44 uni. lib

4. Official Instructions on mmseg. ini configuration

[Mmseg] merge_number_and_ascii = 0; # merge English and numbers abc123/digits =-; # define the character compress_space = 1 that can be connected to English and numbers; # currently, seperate_number_ascii = 0 is not supported; # separate letters and numbers

3. Install csft

1. Old Version Installation

# Cp/coreseek extract directory/mmseg-3.2.14/src /*/*. h/usr/local/mmseg3/include/mmseg/# cd/home/tank/download/coreseek-4.0.1-beta # aclocal # libtoolize -- force # automake -- add-missing # autoconf # autoheader # perl -pi-e's/lpthread-liconv/G' src/Makefile * # make clean #. /configure -- prefix =/usr/local/sphinx -- enable-id64 \ -- with-mysql =/usr/local/mysql2 -- with-mmseg \ -- with-mmseg-separated des =/usr/ local/mmseg3/include/mmseg/\ -- with-mmseg-libs =/usr/local/mmseg3/lib/# make & make install

2. New Version Installation

# cd /home/tank/download/coreseek-4.0.1-beta# ./buildconf.sh# ./configure --prefix=/usr/local/sphinx --enable-id64 \--with-mysql=/usr/local/mysql2 --with-mmseg \--with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ \--with-mmseg-libs=/usr/local/mmseg3/lib/# make && make install

Coreseek-4.0.1, two installation methods are acceptable, but the installation, still will report an error.

4. Install the mysql plug-in sphinxse

1. Copy mysqlse to the mysql program directory storage

# cp -R coreseek-4.0.1-beta/csft-4.0.1-beta/mysqlse /home/tank/download/mysql-5.5.8/storage/sphinx

2. Install mysql 5.5.8 using cmake

#cd /home/tank/download/mysql-5.5.8# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql2 \ -DMYSQL_UNIX_ADDR=/usr/local/mysql2/mysql.sock \ -DCMAKE_BUILD_TYPE=Release -DWITH_SPHINX_STORAGE_ENGINE=1 \ -DDEFAULT_CHARSET=utf8 \ -DDEFAULT_COLLATION=utf8_general_ci \ -DWITH_MYISAM_STORAGE_ENGINE=1 \ -DWITH_INNOBASE_STORAGE_ENGINE=1 \ -DWITH_MEMORY_STORAGE_ENGINE=1 \ -DWITH_READLINE=1 \ -DENABLED_LOCAL_INFILE=1 \ -DMYSQL_DATADIR=/usr/local/mysql2/data \ -DMYSQL_USER=mysql# make && make install

For more information about how to install mysql in cmake, see:Install mysql5.5.11 and later in linux cmake

3. Install mysql5.5.8 in configure

# cd /home/tank/download/mysql-5.5.8# sh BUILD/autorun.sh# ./configure --prefix=/usr/local/mysql2 \--with-plugins=partition,innobase,myisam,sphinx \--with-charset=utf8# make && make install

4. initialize the database

# Cd/home/tank/download/mysql-5.5.8 # chmod + x scripts/mysql_install_db # scripts/mysql_install_db -- basedir =/usr/local/mysql2 \ # initialize data -- datadir =/usr/ local/mysql2/data -- user = mysql # cp support-files/my-medium.cnf/etc/my. cnf # copy configuration file # chown-R mysql: mysql/usr/local/mysql2 # Change permission # vim/etc/my. cnf # Add the following content [mysqld] basedir =/usr/local/mysql2datadir =/usr/local/mysql2/datalog-error =/usr/local/mysql2/mysql_error.logpid-file =/usr/ local/mysql2/mysql. piduser = mysqltmpdir =/tmp

5. Start and log on to mysql

# Cd/usr/local/mysql2/support-files/# cp. /mysql. server/etc/init. d/mysql5 #/etc/init. d/mysql5 start # start the server #/usr/local/mysql2/bin/mysql # Client Connection

6. Enable sphinxse

Sphinxse

The difference between installing sphinxse and sphinxse is that after mysql compilation and installation is completed, you do not need to use root login to install it.

5. Configure sphworker. conf

# Cd/usr/local/mysql2/support-files/# cp. /mysql. server/etc/init. d/mysql5 #/etc/init. d/mysql5 start # cd/usr/local/sphinx/etc # cp sphinx. conf. dist sphworkflow. conf # vim sphinx. conf source src1 {type = mysql SQL _host = localhost SQL _user = root // use the name to change SQL _pass = 111111 // change the password without a password, leave SQL _db = test SQL _query_pre = SET NAMES utf8 // remove this line of comment ........... Omitted ..............}........... Omitted .............. Index rt // Add the following three rows to the index, add Chinese Word Segmentation {type = rt path =/usr/local/sphinx/var/data/rt charset_dictpath =/usr/local/mmseg3/etc // Add charset_type = zh_cn.utf-8/ /Add ngram_len = 0 // Add rt_field = title rt_field = content rt_attr_uint = gid }........... Omitted ..............

6. Start sphinx

// Start indexer [root @ localhost etc] #/usr/local/sphinx/bin/indexer -- config/usr/local/sphinx/etc/sphinx. conf -- allCoreseek Fulltext 4.0 [sph00001.11-id64-dev (r2540)] Copyright (c) 2007-2011, Beijing Choice Software Technologies Inc ( http://www.coreseek.com ) Using config file '/usr/local/sphinx/etc/sphinx. conf '... indexing index 'test1 '... collected 4 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 4 docs, 193 bytestotal 0.012 sec, 15540 bytes/sec, 322.08 docs/secindexing index 'test1stemmed '... collected 4 docs, 0.0 MBsorted 0.0 Mhits, 100.0% donetotal 4 docs, 193 bytestotal 0.002 sec, 75097 bytes/sec, 1556.42 docs/secskipping non-plain index 'did1 '... skipping non-plain index 'rt '... total 6 reads, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avgtotal 18 writes, 0.000 sec, 0.1 kb/call avg, 0.0 msec/call avg // start searchd [root @ localhost etc] #/usr/local/sphinx/bin/searchd -- config/usr/local/sphinx/etc/sphinx. confCoreseek Fulltext 4.0 [sph00001.11-id64-dev (r2540)] Copyright (c) 2007-2011, Beijing Choice Software Technologies Inc ( http://www.coreseek.com ) Using config file '/usr/local/sphinx/etc/sphinx. conf '... listening on all interfaces, port = 9312 listening on all interfaces, port = 9306 precaching index 'test1' precaching index 'test1stemmed 'WARNING: multiple addresses found for 'localhost ', using the first one (ip = 127.0.0.1) precaching index 'rt 'precached 3 indexes in 0.001 sec
The last full-text retrieval task has to be traced back to 2010. At that time, I felt that coreseek was not mature and I used the original sphworkflow. For details, refer to: sphsf-mmseg mysql Chinese word segmentation. What about this time, we decided to use coreseek to see the difference. One, the installation environment and tool server is centos6.5 x86coreseek 4.0.1: http://www.coreseek.cn/uploads/csft/4.0/coreseek-4.0.1-beta.tar.gzmysql 5.5.8: tar zxvf coreseek-4.0.1-beta # cd coreseek-4.0.1-beta/mmseg-3.2.14/# aclocal # libtoolize -- force # automake -- add-missing # autoconf # autoheader # make clean #. /configure -- prefix =/usr/local/mmseg3 # make inst All2, new version installation method #. /bootstrap #. /configure -- prefix =/usr/local/mmseg3 # make installmmseg-3.2.14, both methods can be installed successfully, there is a warning when compiling, but does not affect the installation. 3. After the new version of mmseg is installed, the word segmentation is good, do not use mmseg to generate [root @ localhost mmseg-3.2.14] # ll/usr/local/mmseg3/etc/total usage 5432-rwxr-xr-x 1 root 229 July 31 01:44 mmseg. ini-rwxr-xr-x 1 root 1826251 July 31 01:44 unigram.txt-rwxr-xr-x 1 [...]

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.