How to start elastic search using command terminal in ubuntu

23,622

Solution 1

For installing Elasticsearch you just need to download and decompress the file.

Then go to you Elasticsearch folder and type

./bin/elasticsearch

The server will start, but if you exit the terminal or press Ctrl+X it will stop.

You can add -d if you want to run it as a deamon in the background.

To see if Elasticsearch is running, just type

curl 'http://localhost:9200/?pretty'

or

ps aux | grep elastic

To stop the service, just kill the process.

Solution 2

install the .tar file from the website. Extract it. Go to its bin folder and do a "./elasticsearch". It'll be up and running on port 9200

Share:
23,622
Admin
Author by

Admin

Updated on July 09, 2022

Comments

  • Admin
    Admin almost 2 years

    While installing elastic search in ubuntu-16.04, my process wasn't completed even after several minutes. I have written 'bin/elasticsearch' as my last command in the terminal suring installation. What am I doing wrong ?