Monthly Archives: February 2013

Php solr Integration

Installing Apache Solr PHP extension On Linux and other *nix-based systems There are two ways to install the Solr PECL library on *nix systems: 1) Using the pecl command. 2) Configuring and installing it manually. Using the pecl command Install … Continue reading

Posted in Php, Solr | Tagged , | Leave a comment

Install solr on ubuntu

Install solr on ubuntu Apache Solr is a fast, open-source search solution. The following is to walk through setting up multi-core Solr with Apache Tomcat. Apacha Solr requires Tomcat as servlet container, so the first step, install the Tomcat server: … Continue reading

Posted in Solr | Tagged , | 1 Comment

Linux server important commands

Important PS command: I use the following ps commands in order to check for performance probelms: 1) Displaying top CPU_consuming processes: $ps aux | head -1; ps aux | sort -rn +2 | head -10 2) Displaying top 10 memory-consuming … Continue reading

Posted in Linux Operating System | Tagged , , | Leave a comment

File Handling In NodeJS

You must require the filesystem. var fs=require(‘fs’) var strCounterFileName  =   ‘/path/to/file/counter.txt’; fs.exists(strCounterFileName,function(exists){ if(exists){ // read file. fs.readFile(strCounterFileName, ‘utf8′, function (err,data) { if(err){ return console.log(“exist read:”+err); }else{ console.log(“Read counter From File :”+data); } });//   EOF File read }else{ // Create and … Continue reading

Posted in Node.js | Tagged | Leave a comment

Apache prefork vs worker mpm

Apache: multi-threaded vs multi-process (pre-forked) Apache comes in a few different flavors. The two most common are pre-forked (multi-process) and multi-threaded (worker). The pre-forked flavor runs several copies of itself and each copy is designed to serve one visitor at … Continue reading

Posted in Apache | Tagged | Leave a comment

Setup Lemp on ubuntu 12.04

I have seen some online guides about this but really was after one specific to Ubuntu 12.04. So here goes: Step 1 – Installing Nginx From Source , Install Prerequisites Begin by ensuring that your system’s package database and installed … Continue reading

Posted in Mysql, Nginx, Php | Tagged , , , | Leave a comment

Monitoring services with Monit

Monitoring services with Monit Check all running service on you machine with their port no, #netstat -atlpvn | grep LISTEN Get and install Monit, #sudo apt-get install monit OR #cd /home/ #wget #tar -zxvf monit-5.5.tar.gz #cd monit-5.5 #./configure #make … Continue reading

Posted in Apache, Gearman, Memcached, MongoDB, Monit, Mysql, Node.js, Redis, Sphinx | Tagged , , , , , , , , | Leave a comment

Monitoring node.js with monit, upstart and forever.js

Monitoring Node with upstart, monit and forever.js When it comes time to have your Node project run more like a service, running in the background and auto-recovering from crashes, we can’t simply execute the node command manually from a shell. … Continue reading

Posted in Monit, Node.js | Tagged , , , , , | Leave a comment