How to install Sphinx in Linux (Centos) ?

What is Sphinx and How to install Sphinx in Linux?

What is Sphinx?

It is used to search full-text search in different Data sources such as – SQL , plain text, HTML files etc.

It is Open-source that means – its free.


Used to provide rapid and high Quality of search result.
It is implemented with web applications.

It is very similar to varnish

Below example will help you to know more about Sphinx and how to install it on your server.

Need to install Mysql before we start Sphinx installation

Mysql installation ( I prefer MariaDBsimilar to mysql)

sudo yum install mariadb-server

After installation Start mariadb sql

sudo systemctl start mariadb.service

Enable the Mariadb so that Mariadb starts on server reboot

sudo systemctl enable mariadb.service

Setup MariaDB server


Create one database and user

mysql -uroot

create database techouse;

create user 'techouse'@'localhsot' identified by 'techouse';

grant all on techouse.* to 'techouse'@'localhost';

use techouse;

source example.sql;

Download the version occuring to your requirements

I will show you how to install sphinx with one example

INstall the downloaded package

yum install sphinx-2.2.11-1.rhel7.src.rpm

vim /etc/sphinx/sphinx.conf

Change the username and password according to your DB Details

sql_host = localhost
sql_user = test
sql_pass =
sql_db = test
sql_port = 3306 # optional, default is 3306

I am changing according to my DB

sql_user = techouse
sql_pass = techouse


sudo indexer --all
sudo searchd

python /usr/share/sphinx/api/ this is my test document


I love helping beautiful people like you. I love hanging out with my dogs.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.