Jan 10, 2009

Install Sphinx Search on Ubuntu Intrepid Ibex

If you've graduated from using Ferret you may have heard of the joys of Sphinx Search. Regardless of which plugin you use (there are several) you'll need to install Sphinx itself. If you're running Ubuntu Intrepid Ibex then these instructions are for you. That said, this will work on Debian or Ubuntu Hardy as well.


1. Update and Grab dependencies. Run these commands in order to get the files you need to install Sphinx.


sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install build-essential
sudo apt-get install libmysqlclient15-dev


2. Download Sphinx. You can download the latest code from their website.



3.Untar the source and prep. Here's where it gets a bit complicated. You'll need to extract the source, change into the directory and configure Sphinx. Do that with these commands.


tar xvzf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1/
./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql


4. Make and Install Sphinx Run the standard linux commands to install Sphinx.




make
sudo make install


That's it! Now you can grab your plugins and start up the server.

13 comments:

  1. Perfect instructions! I always appreciate it when articles don't assume we're all pros :)

    ReplyDelete
  2. You can get sources with ./debian/ directory and build debian package with dbuild

    git://github.com/johnl/deb-sphinx-search.git

    ReplyDelete
  3. Just a note to people who want to install Sphinx 0.9.8.1 on Ubuntu Janunty Jackalope: in addition to the packages above libmysql++-dev also need to be installed via apt-get.

    Except that - the instructions above work fine, thanks! :-)

    ReplyDelete
  4. It seems working fine to me on Ubuntu Server 8.04

    ReplyDelete
  5. All good for Debian Lenny too

    ReplyDelete
  6. Thanks a lot! This instruction is concise and complete.

    ReplyDelete
  7. instructions are very clear. it works :-)
    thanks :-)

    ReplyDelete
  8. If I compile these on a 32 bit laptop with ubuntu 9.04. Can I use the binary on a 64 bit ubuntu 8.04 amd server with xen virtualization?

    ReplyDelete
  9. http://www.sphinxsearch.com/wiki/doku.php?id=sphinx_on_debian_gnu_linux

    ReplyDelete
  10. Works great, nice instructions, thank you

    ReplyDelete
  11. really superb...

    simple and effect one...

    god will be give everything to you

    ReplyDelete
  12. thanx m8
    great tutorial

    It works well... thanx again

    ReplyDelete
  13. Just what I was looking for to install on an EC2 instance for a search of California's laws.

    Thanks!

    ReplyDelete