Install and configure sphinx2 in linux

Source: Internet
Author: User

Sphinx is an SQL-based full-text search engine that can be used in combination with MySQL and PostgreSQL for full-text search. It provides more professional search functions than the database itself, this makes it easier for applications to implement professional full-text retrieval. Sphinx specially designs search API interfaces for some scripting languages, such as PHP, Python, Perl, and Ruby. It also designs a storage engine plug-in for MySQL.

# Install sph1_2.x

The Code is as follows: Copy code

Cd/home/addcn
Wget http://sphinxsearch.com/files/sphinx-2.1.1-beta.tar.gz
Tar xvf sphinx-2.1.1-beta.tar.gz
Cd sph0000-2.1.1-beta
Make clean
./Configure-prefix =/usr/local/sphure-with-mysql =/usr/local/mysql
Make & make install

# Configuration
Cd/usr/local/sphinx/etc/

# Error
Export LD_LIBRARY_PATH = "/usr/local/mysq/lib:/usr/lib: $ LD_LIBRARY_PATH"

# Start
/Usr/local/sphinx/bin/searchd-config/usr/local/sphinx/etc/sphinx. conf

# Stop
/Usr/local/sphinx/bin/searchd-stop

# Login
/Usr/local/mysql/bin/mysql-P9306-protocol TCP

# Update
/Usr/local/sphinx/bin/indexer-config/usr/local/sphinx/etc/sphinx. conf-all-rotate

# Associate with real-time index
Truncate rtindex rt;
Attach index disk to rtindex rt;

After the installation, our php mysql full-text search may be several hundred or tens of thousands of times more likely.

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.