Difference between revisions of "How to install Sphinx on Centos Server"

From Brian Nelson Ramblings
Jump to: navigation, search
(Created page with "==How to install Sphinx on Centos Server=== right ==Check and see if yum/apt-get will install it.== yum install sphinx or apt-get install sphinx ...")
 
Line 1: Line 1:
==How to install Sphinx on Centos Server===
+
==How to install Sphinx on Centos Server==
 
[[File:Sphinxsearch.jpg|right]]
 
[[File:Sphinxsearch.jpg|right]]
  

Revision as of 03:17, 1 September 2013

How to install Sphinx on Centos Server

Sphinxsearch.jpg

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

yum install sphinx

or

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.

http://sphinxsearch.com/downloads/release/

Since I am on a CentOS release 6.4 server with x86_64

http://sphinxsearch.com/files/sphinx-2.0.9-1.rhel6.x86_64.rpm

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
http://sphinxsearch.com/contacts.html

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

Installed:
  sphinx.x86_64 0:2.0.9-1.rhel6                                                                                                                                                 

Complete!

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

service searchd start

or

/etc/init.d/searchd start