Thursday, 1 November 2012

How to Instal Sphinx here 1st November 2012 in written form


Sphinx comes in various pre-compiled provides (Windows, Red Hat, etc.), so if your os has a version already gathered and ready to set up, you may just want to set up one of those and be done with it.

You can find out pre-compiled modifications as well as source details information files (if you want to collect your own) here:

http://www.sphinxsearch.com/downloads.html

This set up details is designed for people who want to install/compile from source on a A a linux system systemunix systemunix (and have admin/shell access)...

Log into your server's invest as primary, and run the following purchases (in buy, obviously).
curl -O http://sphinxsearch.com/files/sphinx-2.0.5-release.tar.gz
tar -xzvf sphinx-2.0.5-release.tar.gz
cd sphinx-2.0.5-release
./configure
make
make install
mkdir /home/sphinx
mkdir /home/sphinx-data
mkdir /usr/local/etc

There are two places to Sphinx... the indexer system and the searchd system. Searchd is a daemon that focuses for look for requirements and should always be handling. Because of this, it's a sensible idea to create a process so it immediately a lot when the web host hosting server shoes.

If your system helps init.d, you can create a /etc/init.d/searchd details information file with the following contents:
Code:
#! /bin/sh
#
#               Released by Shawn Hogan
#
# Reviews to returning up LSB init system conventions
### BEGIN INIT INFO
# Provides: searchd
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $network $remote_fs
# Default-Start:  2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: stop and searchd
# Description: searchd is the look for daemon aspect of Sphinx
### END INIT INFO


PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/searchd
NAME=searchd
DESC=searchd
PIDFILE=/home/sphinx/$NAME.pid

test -x $DAEMON || stop 0
##test -x $DAEMONBOOTSTRAP || stop 0

set -e

case "$1" in
start)
echo -n "Starting $DESC: "
nohup $DAEMON > /dev/null 2>&1 &
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
killproc -p $PIDFILE $DAEMON
echo "$NAME."
rm -f $PIDFILE
;;
restart)
echo -n "Stopping $DESC: "
killproc -p $PIDFILE $DAEMON
rm -f $PIDFILE
echo -n "Starting $DESC: "
$DAEMON 2>&1 &
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart}" >&2
exit 1
;;
esac

exit 0
The run the following management from your invest to activate it for the various run-levels: insserv -vd /etc/init.d/searchd

The management should offer you with something along the selections of (which is a fantastic thing):
Code:
enable support ../searchd -> /etc/init.d/rc2.d/S12searchd
enable support ../searchd -> /etc/init.d/rc2.d/K11searchd
enable support ../searchd -> /etc/init.d/rc3.d/S12searchd
enable support ../searchd -> /etc/init.d/rc3.d/K11searchd
enable support ../searchd -> /etc/init.d/rc4.d/S12searchd
enable support ../searchd -> /etc/init.d/rc4.d/K11searchd
enable support ../searchd -> /etc/init.d/rc5.d/S12searchd
enable support ../searchd -> /etc/init.d/rc5.d/K11searchd
Now searchd *should* begin on it's own when you reboot your web host hosting server.

Go ahead and the searchd daemon by handling the /etc/init.d/searchd begin management. If all went as structured, you should be fantastic to go now!

0 comments:

Post a Comment