How to Install Sphinx Search on cPanel / Linux

Follow URL

First we need to grab the Source pacakage from Sphinxsearch download section. use te below command to get the file.


now we have sphinx source package in our server.

First step is to uncompress the sphinx-2.0.4-release.tar.gz file using below command

tar -zxf 'sphinx-2.0.4-release.tar.gz'

then enter into the directory sphinx-2.0.4-release

cd sphinx-2.0.4-release

Am installing sphinx in /usr/local/sphinx directory so we have to create the directory

mkdir /usr/local/sphinx

i want to install sphinx server in /usr/local/sphinx so i have to set the path while configure using -prefix option

./configure --prefix=/usr/local/sphinx

we can specify sphinx to use MYSQL by adding –with-mysql to ./configure

./configure --prefix=/usr/local/sphinx --with-mysql

if above command not able to find mysql libraries. we have to provide the libraries path

./configure --prefix=/usr/local/sphinx --with-mysql=/usr/local/mysql

For installing sphinx with PostgreSQL specify lik this –with-pgsql

./configure --prefix=/usr/local/sphinx --with-pgsql

if above command not able to find pgsql libraries. we have to provide the libraries path

./configure --prefix=/usr/local/sphinx --with-pgsql=/usr/local/include/postgresql

next setp is make and make install

make install

complete pre is (make sure you’re downloading the latest version from the site)

tar -zxf sphinx*.tar.gz
cd sphinx*
mkdir /usr/local/sphinx
./configure --prefix=/usr/local/sphinx
make install

Now we have installed sphinx search server


if you get error sphinx.h:54:19: error: mysql.h: No such file or directory.

sphinx.h:54:19: error is because mysql-devel is not installed on the server. To fix this we have to install mysql-devel.

use below command to install mysql-devel

yum install mysql-devel

June 11, 2015   3942    CPanel / WHM  
Total 2 Votes:

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Comment