How to run and configure Elastic Search & X-Pack?

Download a specific version of ElasticSearch to your PC.

i would recommend the stable version 5.6.4

Download Link: https://www.elastic.co/downloads/past-releases/elasticsearch-5-6-4

After download has been completed, Extract it in your system.

For windows extract it using winzip/winrar/7z but for Linux use the below command:

tar -xvzf elasticsearch5.6.4.tar.gz
make sure Java is installed in the system.

For windows,

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

For Linux,

sudo add-apt-repository -y ppa:webupd8team/java

sudo apt-get update

sudo apt-get -y install oracle-java8-installer

After extraction has been completed, go to the config folder and open elasticsearch.yml which controls the whole elastic search module and would be empty by default.

open the elasticsearch.yml  and add a cluster.

cluster.name: my_first_cluster

Then save elasticsearch.yml file

And go to bin folder and run elasticsearch.bat for windows and ./elasticsearch for Linux and check if everything is running fine.

For daemon run:

type: ./elasticsearch -d -p pid.log

How to kill elastic search process?

Find the process of elastic search for the port 9200:

command:

netstat -a -n -o | find "9200" Kill the process to stop elastic search: pkill <PID id> If you have ran from daemon and saved one pid.log file then you can find the pid id from that file itself. For more information and help contact: contact@ibnus.io