## Install Java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
## Install elasticsearch
In AWS, you can't edit /etc/apt/sources.list
, as it's re-generated at each reboot.
# add elasticsearch repo key
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
# add the elasticsearch repo in apt sources
echo "deb http://packages.elasticsearch.org/elasticsearch/1.3/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasicsearch.list
sudo apt-get update
sudo apt-get install elasticsearch