Move into /tmp directory and get latest release. You can get the latest release from http://sphinxsearch.com/downloads/
|
cd /tmp wget http://sphinxsearch.com/files/sphinx-2.3.2-beta.tar.gz |
Uncompress
|
tar -zxf 'sphinx-2.3.2-beta.tar.gz' |
Create directory
Enter the Uncompressed directory
Configure to use the directory we created above and to use mysql and postgresql
|
./configure --prefix=/usr/local/sphinx --with-mysql --with-pgsql |
Build
Create Configuration File
|
cp -pr /usr/local/sphinx/etc/sphinx.conf.dist /usr/local/sphinx/etc/sphinx.conf |
Create Start-up Script
|
#!/bin/bash case "${1:-''}" in 'start') /usr/local/sphinx/bin/searchd ;; 'stop') /usr/local/sphinx/bin/searchd --stop ;; 'restart') /usr/local/sphinx/bin/searchd --stop && /usr/local/sphinx/bin/searchd ;; *) echo "Usage: $SELF start|stop|restart" exit 1 ;; esac |
Make Script Writable
|
chmod 755 /etc/init.d/sphinx |
Start the Service
|
/etc/init.d/searchd start |
Create chkservd file
|
nano /etc/chkserv.d/searchd service[searchd]=x,x,x,/etc/init.d/searchd restart,searchd,root|searchd |
Add to /etc/chkserv.d/chkservd.conf
Restart Tailwatch
|
/scripts/restartsrv_tailwatchd |