Sphinxsearch is believed to be the fastest search engine. It is very much useful for large websites. In this post, implementation of sphinxsearch in phpBB forum is described.
Sphinxsearch can only be installed in a Nginx server. Apache users can not have this search engine right now.
Installation
To install Sphinxsear in a Ubuntu server, run the following command:-
sudo apt-get update sudo apt-get install sphinxsearch
Creating Working Directories
Run this:
sudo mkdir -p /var/www/sphinx sudo mkdir -p /var/www/sphinx/log
Goto ACP of phpBB
From Administrative Control Panel of phpBB, goto search setting and select Sphinx Fulltext Search.
Now copy the automatically generated content for sphinx.conf file. Now click Submit.
Configuration
Run this command:
sudo nano /etc/sphinxsearch/sphinx.conf
Paste the content here which has been copied in previous post.
Remember to change the following only:-
sql_user = username sql_pass = password
N.B: If you have forgotten the username and password, then download config.php from the forum root folder through ftp software.
Goto ACP of phpBB again
Click Maintenance->Search index. Click create index under Sphinx Fulltext.
Indexing, Crontab
Now you have to run the following commands sequentially.
Index:-
indexer --config /etc/sphinxsearch/sphinx.conf index_phpbb_e2325eXXXXXXXXXX_main >> /var/www/sphinx/log/indexer.log 2>&1 &
indexer --config /etc/sphinxsearch/sphinx.conf index_phpbb_e2325eXXXXXXXXXX_delta >> /var/www/sphinx/log/indexer.log 2>&1 &
indexer --rotate --config /etc/sphinxsearch/sphinx.conf index_phpbb_e2325eXXXXXXXXXX_delta >> /var/www/sphinx/log/indexer.log 2>&1 &
searchd --config /etc/sphinxsearch/sphinx.conf >> /var/www/sphinx/log/searchd-startup.log 2>&1 &
Crontab:-
crontab -e
Add the following line at the end of the file.
0 3 * * * indexer --rotate --config /etc/sphinxsearch/sphinx.conf index_phpbb_e2325eXXXXXXXXXX_main >> /var/www/sphinx/log/indexer.log 2>&1 &
You are done.
Leave a Reply