CentOS6.4 64-bit installation of Sphinx and Sphinx for PHP extensions

Source: Internet
Author: User

On the official website to download the latest sphinx, the recent database to be searched to play dead, think or add an index it. Here to share the installation of Sphinx and PHP extension sphinx.so installation method, there may be many similar tutorials on the web.

Before installing, make sure you install some common stuff, such as GCC mysql-devel! Of course, do not install it will also prompt you some wrong, look at it! Get down to the chase.

This is a large amount of information, the following are the common extensions that need to be installed

  

Sphinx Official Website: http://sphinxsearch.com/downloads/release/

Please use the stable version, the online machine will not play beta version!

Installing Sphinx

Tar zxvf sphinx-2.1.4-release.tar.gzcd sphinx-2.1.4-release./configure--prefix=/usr/local/sphinx–-with-mysqlmake && make Install

If there is a undefined reference to libiconv error in make, refer to http://www.lvtao.net/database/sphinx-make-error.html workaround

Libsphinxclient Installation (PHP module required)

CD Api/libsphinxclient./configure–prefix=/usr/local/sphinxmake && make install

Installing the PHP Sphinx module

: Http://pecl.php.net/package/sphinx

wget Http://pecl.php.net/get/sphinx-1.3.0.tgztar zxf sphinx-1.3.0.tgzcd sphinx-1.3.0/usr/local/php/bin/phpize./ Configure--with-php-config=/usr/local/php/bin/php-config--with-sphinx=/usr/local/sphinx/make && make Install

Here is the installation method of its phpize extension:

  

After installation, in the installation directory under the ETC directory, there is a sample of test data and configuration

CD/USR/LOCAL/SPHINX/ETCCP sphinx.conf.dist sphinx.conf

The sphinx.conf inside the database address, the account password to change, and then lvtao.sql into the database Lvtao
Test execution

/usr/local/sphinx/bin/search Lvtao

You'll see some information about the query.

From my blog, will be synchronized with the other functions of the later operation. Http://www.lvtao.net/database/sphinx-install.html

CentOS6.4 64-bit installation of Sphinx and Sphinx for PHP extensions

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.