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