aws

Tuesday, October 6, 2015

Setting up Elasticsearch in AWS instance (single node)


Setting up Elasticsearch(Single node) instance in AWS is pretty simple.

Download and install Jdk1.7
apt-get install openjdk-7-jre

Download elasticsearch zip file
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.1.zip

Install unzip
apt-get install unzip

Uncompress the elasticsearch-1.7.1.zip file
unzip elasticsearch-1.7.1.zip

Goto the bin folder and start the instance
cd ~/elasticsearch-1.7.1/bin

./elasticsearch &

You can test the setup by using curl or open the http://localhost:9200/ in a browser

curl http://localhost:9200/

{
  "status" : 200,
  "name" : "Morgan Le Fay",
  "version" : {
    "number" : "1.3.1",
    "build_hash" : "2de6dc5268c32fb49b205233c138d93aaf772015",
    "build_timestamp" : "2014-07-28T14:45:15Z",
    "build_snapshot" : false,
    "lucene_version" : "4.9"
  },
  "tagline" : "You Know, for Search"

}


By default elasticsearch will be pointing to port 9200. This port number 9200 need to added in the Security group of your AWS instance as a inbound custom TCP Rule.


No comments: