How to install Sphinx on OS X

Getting a local development environment setup to run Sphinx on your Mac is pretty easy. You can boil it down to the following quick commands.

1
2
3
4
5
6
wget http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
tar xvzf sphinx-0.9.9.tar.gz
cd sphinx-0.9.9
./configure
make
sudo make install

This assumes you’re using a default MySQL installation. If however you’re like me and using MySQL installed from macports, you’ll need to pass the location of the MySQL configuration directories to Sphinx. The configure command would then change like so:

1
./configure
1
./configure --with-mysql-includes=/opt/local/include/mysql5/mysql/ --with-mysql-libs=/opt/local/lib/mysql5/mysql/

On a side note, Sphinx 1.10-beta has also just recently been released (July 10’). This release has real-time indexes support, a welcome addition I have been waiting for. Definately check it out.

Comments

Ari Fikri January 20, 2012 at 12:24 am
I think we can install it via brew.
Irish January 26, 2012 at 5:58 pm
Yep, but not everyone uses HomeBrew