Configuration Settings of Elasticsearch Before Installing In Linux
If you face some issues in installing the Elasticsearch in Linux and getting Elasticsearch service failed. You need to make Configuration Settings of Elasticsearch file.
I will tell you what you need to do. It’s very important to make these changes. If you’re facing issue in Starting Elasticsearch Service.
Check Out: Install Elasticsearch Using Source Code
Check Permission on Elasticsearch
ls -ld /etc/elasticsearch
Let’s begin with Elasticsearch.yml file
Go to vim /etc/elasticsearch/elasticsearch.yml
1. You need to define a Cluster name
2. Define a descriptive name for the node:
3. Path to directory where to store the data
I didn’t change it. If you want, You can define a location.
4. Lock the memory on startup:
Check Out: BootStrap Checks Failed In ElasticSearch
5. Set the bind address to a specific IP
6. Set a custom port for HTTP:
Go to vim /etc/sysconfig/elasticsearch
You may change this location. I’m using the same location which are defined by default.
1. Elasticsearch home directory
2. Elasticsearch configuration directory
3. Elasticsearch data directory
Check Out: Error : Can’t Run Elasticsearch As Root
4. Elasticsearch logs directory
4. Elasticsearch PID directory
5. Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g
6. You may also uncomment this lines
7. Specifies the maximum file descriptor number that can be opened by this process
8. The maximum number of bytes of memory that may be locked into RAM
Check Out: Install Elastisearch Using Repo
9. Maximum number of VMA (Virtual Memory Areas) a process
These settings are mandatory if you want to install Elasticsearch otherwise Service won’t work.