1 2 |
cd /tmp wget http://sphinxsearch.com/files/sphinx-2.3.2-beta.tar.gz |
1 |
tar -zxf 'sphinx-2.3.2-beta.tar.gz' |
1 |
mkdir /usr/local/sphinx |
1 |
cd sphinx-2.3.2-beta |
1 |
./configure --prefix=/usr/local/sphinx --with-mysql --with-pgsql |
1 2 |
make make install |
1 |
cp -pr /usr/local/sphinx/etc/sphinx.conf.dist /usr/local/sphinx/etc/sphinx.conf |
1 |
nano /etc/init.d/searchd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#!/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 |
1 |
chmod 755 /etc/init.d/sphinx |
1 |
/etc/init.d/searchd start |
1 2 |
nano /etc/chkserv.d/searchd service[searchd]=x,x,x,/etc/init.d/searchd restart,searchd,root|searchd |
1 |
searchd:1 |
1 |
/scripts/restartsrv_tailwatchd |