After leaving NodeJS about 6 month, I still hard to find articles who explain how to running NodeJS services in production mode. This is mean, running NodeJS services by user permission (not by root) and can automatically restart if crashed. Well, this is not only for NodeJS cases, but you can also implement this solution for running Twisted services.
I use Ubuntu 12.04 Precise Pangolin at this guide. Don’t worry, it’s doesn’t have a big difference step with previous Ubuntu version. So, let start!
Instead using synaptic and install sphinxsearch deb package, we also can use the source. First, you should download source package from the sphinxsearch website http://sphinxsearch.com/downloads/.
At this example, I use sphinx-2.0.4-release.tar.gz. I use Ubuntu 12.04 Precise. Then you can extract it and start compiling. Here are the steps to do :
sudo apt-get install build-essential libmysql++-dev libmysqlclient18-dev
tar -xvvf sphinx-2.0.4-release.tar.gz
sudo make install
It will installed in /usr/local. For sphinx.conf, you can create it at /usr/local/etc.
If you need to uninstall sphinx search from source, then just go to previous folder (sphinx-2.0.4-release) and do :
sudo make uninstall