How to install Sphinx Search with libstemmer support on Unbuntu 10.04

I have made a little recipe to install Sphinx Search with libstemmer (for added number of languages) on Ubuntu 10.04 Lucid with postgres support and no MySQL support.

Here is what needs to be done as the root user on your Ubuntu linux terminal:

0-) Before we start, we need to make sure all Sphinx dependecies are met:

aptitude install -y python-software-properties
apt-add-repository ppa:pitti/postgresql
aptitude update
aptitude install -y postgresql-server-dev-9.0 build-essential


1-) Get the current version of sphinx and uncompress it.

cd /opt
wget http://sphinxsearch.com/files/sphinx-2.0.1-beta.tar.gz
tar -xvzf sphinx-2.0.1-beta.tar.gz


2-) Get libsnowball / libstemmer to add more languages to the stemming process and uncompress it

wget http://snowball.tartarus.org/dist/libstemmer_c.tgz
tar -xvzf libstemmer_c.tgz'


3-) Copy all files from libstemmer to the sphinx directory so they can be compile together

cp -fa libstemmer_c/* sphinx-2.0.1-beta/libstemmer_c/

./configure --prefix=/etc/sphinx --without-mysql --with-pgsql --enable-id64 --with-libstemmer


5-) Make and install sphinx using 4 jobs to speed up compiling (most people have 4 core processors, so make it 4 jobs)

make -j4 install


6-) Create simbolic links to sphinx executables so it can be accesses from anywhere

cd /usr/local/bin
run('ln -s /etc/sphinx/bin/indexer')
ln -s /etc/sphinx/bin/indextool
ln -s /etc/sphinx/bin/search
ln -s /etc/sphinx/bin/searchd
ln -s /etc/sphinx/bin/spelldump



Now, follow instruction on the next blog post in order to configure you sphinx instalation

Comments

  1. Great post! thanks for you hard work :)

    In the sixth step, I think that run(' it's not necessary.

    ReplyDelete

Post a Comment

Popular posts from this blog

Draft Version of Tryton_Sphinx integration

Project Abstract