Published on Jan 12 2015 in Java

This tutorial covers installation of standalone ElasticSearch distribution running with included Netty webserver. It is installed on shared server alongside (main) private JVM running application server.

Prerequisites:

Now the procedure in steps:

wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.2.tar.gz
tar xzf elasticsearch-1.4.2.tar.gz
sed -i 's/^#http.port: 9200/http.port: 10963/' elasticsearch-1.4.2/config/elasticsearch.yml
sed -i 's/^#transport.tcp.port: 9300/http.port: 10962/' elasticsearch-1.4.2/config/elasticsearch.yml
sed -i -r 's/ES_MAX_MEM=[[:digit:]]+.*/ES_MAX_MEM=256m/' elasticsearch-1.4.2/bin/elasticsearch.in.sh 
sed -i -r 's/ES_MIN_MEM=[[:digit:]]+.*/ES_MIN_MEM=256m/' elasticsearch-1.4.2/bin/elasticsearch.in.sh

Note, your package limits may be too low to run the app. You may want to upgrade the package then.

elasticsearch-1.4.2/bin/elasticsearch 2>&1 >> ~/elasticsearch.log &

Press Enter if you did not get command line prompt. Check the ~/elasticsearch.log for error messages or try running it in foreground.

Note, if you skip 2>&1 >> ~/elasticsearch.log & the output will go to terminal (foreground run) and you can stop it with Ctrl+C.

curl -X GET http://yourdomain.com:10963/

You should get:

{
 "status" : 200,
 "name" : "Wildpride",
 "cluster_name" : "elasticsearch",
 "version" : {
   "number" : "1.4.2",
   "build_hash" : "927caff6f05403e936c20bf4529f144f0c89fd8c",
   "build_timestamp" : "2014-12-16T14:11:12Z",
   "build_snapshot" : false,
   "lucene_version" : "4.10.2"
 },
 "tagline" : "You Know, for Search"
}