a. Installing and configuring Elasticsearch
Guide to install Elastic Stack
Last updated
Guide to install Elastic Stack
Last updated
For simplicity reasons I will be installing Elastic Stack as an All-in-One server that has all three instances, Elasticsearch, Kibana, and Logstash on a Ubuntu 18.04 LTS server with 8GB of RAM.
Firstly, I will add the name of my single-node cluster in /etc/hosts to use later in my elasticsearch configuration file.
Considering the impact of swap on the performance and stability of the nodes, it is recommended to disable it permanently by modifying the/etc/fstab
file.
Then comment any ligne that contains the word swap
in the/etc/fstab
then delete swapfile
I am going to work here with version 7.8.0
of elastic stack since, later, I will be installing opendistro's plugins which are at the time of writing this blog was not compatible with the latest version of Elastic Stack. .
As a rule of thumb, it is recommended to dedicate half of the available RAM to Elasticsearch. In our case we have 8GB so we will modify jvm.options
accordingly.
Next step is modifying elasticsearch.yml
configuration file to fit my single-node cluster requirements.
I have a single-node cluster so obviously it will be my data node for storing data, my master node and my ingest node if I am willing to use Elasticsearch pipelines.
It is recommended to modify system configuration to allow the user running Elasticsearch to access more resources than allowed by default. This part depends on the system you're using and the method you used to install Elasticsearch, since we are using Ubuntu and the Debian package manual installation the following method would make the necessary changes.
Add the following lines then reload and start Elasticsearch :
Configure elasticsearch service for automatic startup
Check its status and curl it