Mainly 3 steps need to consider for elasticsearch installation.
1. Install Java Package
2. Download & Install Elasticsearch Latest version
3. After successful installation test elastisearch is working or not.
1. Install Java Package
Elastic search is build over Java. So before install the elastic search package we have to install java on Ubuntu. We need to install java 8 or later. If we have already java installed in our system then no need do install once again. Check system is alreay installed Java with below commands,
> java -version
Install Java:
In my system i don’t have installed Java yet. Using below commands am going to install java package.
>sudo add-apt-repository ppa:webupd8team/java -y
>sudo apt-get update
>sudo apt-get install oracle-java8-installer
2. Download & Install Elasticsearch Latest version:
After successful installation of java our system is ready to install the elasticsearch package. Download Elasticsearch package from following link: https://www.elastic.co/downloads/elasticsearch
I have downloaded 6.2.3 with zip format.
Unzip & keep the files from following Ubuntu Folder path, home/elasticsearch/
Ex: Installation package will store like home/elasticsearch/elasticsearch-6.2.3/
2.2 Execute following command to test the elasticsearch is installed or not
Ex: bin>./elasticsearch
Execute home/elasticsearch/elasticsearch-6.2.3/bin>./elasticsearch
once you execute the above command you will list out response from the server at the end you may get message as like below, mean you server is ready to use.
bin> indices into cluster_state
Note Defalut post for elasticsearch is : 127.0.0.1:9300
3. After successful installation test elastisearch is working or not. Yes after successful installation we need to test it whether elastic search is working or not.
3.1 Way1: Hit http://localhost:9300 – we will get default detail about the elasticsearch
3.2 way2: Also we hit http://localhost:9300 same url with curl action from command prmt
Ex: curl http://localhost:9300
3.3 way3: Use some rest client plugin on your browser. Because elasticsearch will work with REST API Client.