Installing Elasticsearch on Linux

Download the Elasticsearch distribution, note the version you want to use

curl -L -O
tar -xvf elasticsearch-2.3.4.tar.gz

Make sure you have Java 7. Verify by java -version. If not find out the value of $JAVA_HOME by using echo $JAVA_HOME. Download Java 7 and set the $JAVA_HOME value to the place where you have downloaded Java 7.

Adding elasticsearch user
1. Login as su
2. useradd elasticsearch
3. Donot select password so that this user cannot be used for shell login

Run Elasticsearch as sudo -H -u elasticsearch bin/elasticsearch -d. This runs elasticsearch as daemon.
Also to increase the heap size use ES_JAVA_OPTS="-Xms2g -Xmx2g", so the command becomes
sudo -H -u elasticsearch ES_JAVA_OPTS="-Xms2g -Xmx2g" bin/elasticsearch -d

Categories: Elasticsearch

1 reply


  1. Index Data from a Relational Database into Elasticsearch – 1 | Experiences Unlimited

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: