Install elasticsearch for local dev

Install nodejs and npm
sudo apt-get install nodejs-legacy
sudo apt-get install npm
Install pm2
sudo npm install pm2 -g 
Install maildev
sudo npm install maildev -g
Create folder
sudo npm init  
sudo npm install maildev --save  
Create index.js
var Maildev = require("maildev");
var maildev = new Maildev();
Start maildev
pm2 start index.js --name "maildev"  
pm2 startup ubuntu  
pm2 save  
Install redis
sudo apt-get install redis-server 
Install Java
sudo apt-get install openjdk-7-jre 
Install ES
curl -L -O  https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.deb  
sudo dpkg -i elasticsearch-1.4.2.deb