How to install Sphinx on Centos Server

From Brian Nelson Ramblings
Jump to: navigation, search

How to install Sphinx on Centos Server

Check and see if yum/apt-get will install it.

yum install sphinx


apt-get install sphinx

If that does not work then lets manually install it

Go to -> and find the correct RPM for the OS/Arch of the server you're installing it on.

Since I am on a CentOS release 6.4 server with x86_64

Now I will install it with Yum

yum localinstall sphinx-2.0.9-1.rhel6.x86_64.rpm

Now you should get something that looks like this

  Installing : sphinx-2.0.9-1.rhel6.x86_64                                                                                                                                  1/1 

Sphinx installed!
Now create a full-text index, start the search daemon, and you're all set.

To manage indexes:
    editor /etc/sphinx/sphinx.conf

To rebuild all disk indexes:
    sudo -u sphinx indexer --all --rotate

To start/stop search daemon:
    service searchd start/stop

To query search daemon using MySQL client:
    mysql -h 0 -P 9306
    mysql> SELECT * FROM test1 WHERE MATCH('test');

See the manual at /usr/share/doc/sphinx-2.0.9 for details. 

For commercial support please contact Sphinx Technologies Inc at

 Verifying  : sphinx-2.0.9-1.rhel6.x86_64                                                                                                                                  1/1 

  sphinx.x86_64 0:2.0.9-1.rhel6                                                                                                                                                 


To complete the process edit your /etc/sphinx/sphinx.conf file and run

service searchd start


/etc/init.d/searchd start

Now lets make it start at bootup

chkconfig searchd on
chkconfig --list searchd
searchd         0:off   1:off   2:on    3:on    4:on    5:on    6:off