Install Java and ElasticSearch on elasticsearch1 and elasticsearch2.