Install Elasticsearch 1.4 on Debian/Ubuntu

Install Java:

apt-get install openjdk-7-jre openjdk-7-jre-headless

Add the repository and install Elasticsearch:

wget -qO - | sudo apt-key add -
add-apt-repository "deb stable main"
apt-get update
apt-get install elasticsearch

Edit /etc/default/elasticsearch and change ES_HEAP_SIZE to limit memory usage depending on your machine.

Start Elasticsearch:

/etc/init.d/elasticsearch start

Configure Elasticsearch to automatically start during bootup :

update-rc.d elasticsearch defaults 95 10