How to Install Sphinx 2.0.2 on CentOS-5.2 PostgreSQL

Summary: We have explain in earlier articles how to install sphinx on ubuntu and then configure it with postgresql. In this article I am going to explain how to install sphinx 2.0.2 on CentOS.

Follow the Steps you will finally install Sphinx successfully on your CentOS server.
Step-1: Install the dependencies

yum install gcc
cd /usr/local

Step-2: Download the sphinx from and unzip

tar -zxvf sphinx-2.0.2-1.beta.tar.gz

Step-3: : Check where is your postgres config file

whereis pg_config

Step-4: If the above command didn’t show the pg_config file location then install the pgsql devel

yum install postgresql-devel


whereis pg_config
pg_config: /usr/bin/pg_config /usr/include/pg_config.h /usr/share/man/man1/pg_config.1.gz

Step-6: Move to Sphinx Direcotry for further installation.

cd sphinx-2.0.2-1.beta

./configure –without-mysql –with-postgres /usr/bin/pg_config

Step-7: Opps g++ Missing let install the g++.

yum install g++

Step-8: Now all the dependencis are isntalled lets make and install sphinx.

make && make install

Step-9: To configure sphinx first we have to copy its configuration file ot our etc directory of sphinx.

cp /usr/local/etc/ /usr/local/etc/sphinx.conf

Step-10: cd /usr/local/etc/

vim sphinx.conf

Step-11: do the changes as required

database pgsql
database user
database name
database password
port: 5432

save and quit.

Step-12: Now run the Indexer to check the configuration works fine.

/usr/local/etc/bin/indexer –all
searchd start

Thats it.

  1. 3 years ago
    • 3 years ago
  2. 2 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *