Friday 25 November 2011

how to install Sphinx on Ubuntu 10.10 with PostgreSQL


Sphinx is a full-text search engine, publicly distributed under GPL version 2. Commercial licensing (eg. for embedded use) is available upon request. You can use Sphinx for creating big data indexes. It supports MySQL, PostgreSQL, ODBC.
If you use Ubuntu 10.10, you can use

1: go to sphinx site and download the stable version.
2: install the dependency g++ c compiler.
apt-get install gcc 
3: now do the following steps
4: cd to directory where you download the sphinx and type the command:
mv sphinx.tar.gz(the name of file you downloaded) /usr/local
5: cd /usr/local/
6: tar zxvf sphinx.tar.gz and press enter
7: cd sphinx 
8: ./configure --with-postgres /
may its give an error message:
ERROR: cannot find PostgreSQL libraries. If you want to compile with PosgregSQL support,
       you must either specify file locations explicitly using
       --with-pgsql-includes and --with-pgsql-libs options, or make sure path to
       pg_config is listed in your PATH environment variable. If you want to
       disable PostgreSQL support, use --without-pgsql option.
locate your pg_config with command # whereis pg_config this will show you the if it is installed there. if just show 
pg_config:
then install the library;

9: sudo apt-get install libpq-dev

now again type # whereis pg_config
 pg_config:/usr/bin/pg_config /usr/share/man/man1/pg_config.1.gz

now again type the command 
# ./configure --with-postgres /usr/bin/pg_config  and press enter

configuration done
------------------

You can now run 'make' to build Sphinx binaries,
and then run 'make install' to install them.

10: Build the binaries:
# make
11: install the package
#make install 
if it successfully leave the directory it mean you have install it. 
.......................................................................................................................
for any query regarding installation leave a comments here. or you can email me at shahmeer09@gmail.com

No comments:

Post a Comment