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

From Brian Nelson Ramblings
Jump to: navigation, search
Line 58: Line 58:
 
or
 
or
 
  /etc/init.d/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

Revision as of 03:19, 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

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