Instalar
web@rmf:~>sudo zyppe in libmysqld-devel
web@rmf:~>wget http://sphinxsearch.com/files/sphinx-2.2.6-release.tar.gz
web@rmf:~>wget http://snowball.tartarus.org/dist/libstemmer_c.tgz
web@rmf:~>tar -xf sphinx-2.0.5-release.tar.gz
web@rmf:~>tar -xf libstemmer_c.tgz
web@rmf:~>cp -R libstemmer_c/* sphinx-2.0.5-release/libstemmer_c/
web@rmf:~>cd sphinx-2.0.5-release/
web@rmf:~>./configure --prefix=/usr/local/sphinx --with-libstemmer --with-mysql
web@rmf:~>sudo make install
web@rmf:~>sudo make clean
web@rmf:~>sudo mkdir /var/log/searchd
web@rmf:~>sudo vi /etc/init.d/sphinx
#!/bin/sh
# sphinx: Startup script for Sphinx search
#
CONFIG="--config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf"
BINDIR="/usr/local/sphinx/bin"
case "${1:-}" in
'start')
# put the command to start sphinx
# i.e., /usr/bin/searchd start or /usr/bin/searchd --daemon or whatever the command is
$BINDIR/searchd $CONFIG
;;
'stop')
# stop command here
$BINDIR/searchd $CONFIG --stop
;;
'restart')
# restart command here
$BINDIR/searchd $CONFIG --stop
$BINDIR/searchd $CONFIG
;;
*)
echo "Usage: $SELF start|stop|restart"
exit 1
;;
esac
sudo chmod +x /etc/init.d/sphinx
sudo chkconfig --add sphinx
sudo /usr/local/sphinx/binindexer --config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf --all
sudo /usr/local/sphinx/binsearchd --config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf
Re hacer indices
sudo /usr/local/sphinx/bin/searchd --config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf --stop
sudo /usr/local/sphinx/bin/indexer --config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf --all --rotate
sudo /usr/local/sphinx/bin/searchd --config /home/web/public_html/MiCmsZf/sphinx/sphinx.conf