install Sphinx on CentOS

Install some required libs:

yum install unixODBC-libs unixODBC -y

Grab the latest version from here: http://sphinxsearch.com/downloads/release/

mkdir /root/temp/
cd /root/temp
wget http://sphinxsearch.com/files/sphinx-2.1.8-1.rhel6.x86_64.rpm

This way I could install the missing libraries:


yum install unixODBC unixODBC-devel postgresql-libs

#########

wget "http://downloads.mysql.com/archives/mysql-5.1/MySQL-shared-compat-5.1.49-1.rhel5.x86_64.rpm"

rpm -ivh MySQL-shared-compat-5.1.49-1.rhel5.x86_64.rpm

##########
And then, I tried again (successfully this time) to reinstall Sphinx Search:

Now install the downloaded rpm:

rpm -i sphinx-2.1.8-1.rhel6.x86_64.rpm

You should see something like this:

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.1.8 for details.

For commercial support please contact Sphinx Technologies Inc at
http://sphinxsearch.com/contacts.html

Once you have configured sphinx properly at /etc/sphinx/sphinx.conf, run the indexer (sudo -u sphinx indexer –all –rotate) and after that just start Sphinx:

service searchd start

Finally add it to the boot system:

chkconfig searchd on

Leave a comment