Tech Recipe – Installing Sphinx and the PECL extension

Installing sphinx and the PECL extension has confused me a couple of times. The installation is arcane and buggy, so I’ve written down the steps to automate it. I’ve used this on Ubuntu 11.10+ . If you know of how to make this work on CentOS or another Linux, let me know. And now, the script :

sudo apt-get install g++
wget http://sphinxsearch.com/files/sphinxsearch_2.0.6-release-0ubuntu11~lucid_amd64.deb
sudo dpkg -i sphinxsearch_2.0.6-release-0ubuntu11~lucid_amd64.deb
cd /usr/share/sphinxsearch/api/libsphinxclient
sudo ./configure
sudo make
sudo make install
sudo pecl install sphinx #Press enter when asked for path
sudo sh -c 'echo "extension=sphinx.so" > /etc/php5/conf.d/sphinx.ini'
sudo service apache2 restart

Hope this saves you some time.

Advertisements

One thought on “Tech Recipe – Installing Sphinx and the PECL extension

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s