cPanel INSTALLATIONS

Install Sphinx on cPanel or CentOS

Install Sphinx
Install Sphinx

Install Sphinx on cPanel or CentOS

This post will help you to install Sphinx on cPanel or CentOS. Sphinx is a free software. It is designed to provide full-text search functionality to client applications.

Install Sphinx

The latest Sphinx version can be found from Here

Download the package and install it using the following link.

 
wget http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz
tar xzf sphinx-2.2.10-release.tar.gz
cd sphinx-2.2.10-release
./configure --prefix=/usr/local
make
make install

After the installation, please create a configuration file.

 
cp -pr /usr/local/etc/sphinx.conf.dist /usr/local/etc/sphinx.conf

Then, we need to create the start-up scripts.

 
vim /etc/init.d/searchd

and add the following:

 
#!/bin/bash
case "${1:-''}" in
'start')
/usr/local/bin/searchd
;;
'stop')
/usr/local/bin/searchd --stop
;;
'restart')
/usr/local/bin/searchd --stop && /usr/local/bin/searchd
;;
*)
echo "Usage: $SELF start|stop|restart"
exit 1
;;
esac

Make the start-up script file excecutable.

 
chmod 755 /etc/init.d/searchd

and start the service.

 
/etc/init.d/searchd start

Also, you can set autostart after server reboot by adding the start-up script on rc.local file.

 
vim /etc/rc.local

and add the following on it.

 
/etc/init.d/searchd start

That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at info@grepitout.com