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 ?
3 Answers
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.
One way to start Elasticsearch is by extracting the .tar
file and entering the bin directory and running the command ./elasticsearch
.
The other way, if you install it using apt
or apt-get
is by running systemctl start elasticsearch
or systemctl start elasticsearch.service
.
If you need root privileges, you can prepend sudo
with the command.
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
bin/elasticsearch
is not for installing ES but for launching it. So it's normal that this command is not returning, it just means your ES server is up and running (which is a good thing)