elasticsearch configuration

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

Configuration A:

Go to vim /etc/elasticsearch/elasticsearch.yml

1. You need to define a Cluster name

cluster.name: Elastic-Server

2. Define a descriptive name for the node:

node.name: node-1

3. Path to directory where to store the data

path.data: /path/to/data

path.logs: /path/to/logs

I didn’t change it. If you want, You can define a location.

4. Lock the memory on startup:

bootstrap.memory_lock: true

Check Out: BootStrap Checks Failed In ElasticSearch

5. Set the bind address to a specific IP

network.host: your_Server_ip

6. Set a custom port for HTTP:

http.port: 9200

Configuration B:

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

ES_HOME=/usr/share/elasticsearch

2. Elasticsearch configuration directory

CONF_DIR=/etc/elasticsearch

3. Elasticsearch data directory

DATA_DIR=/var/lib/elasticsearch

Check Out: Error : Can’t Run Elasticsearch As Root

4. Elasticsearch logs directory

LOG_DIR=/var/log/elasticsearch

4. Elasticsearch PID directory

PID_DIR=/var/run/elasticsearch

5. Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g

ES_HEAP_SIZE=2g

6. You may also uncomment this lines

ES_USER=elasticsearch

ES_GROUP=elasticsearch

7. Specifies the maximum file descriptor number that can be opened by this process

MAX_OPEN_FILES=65536

8. The maximum number of bytes of memory that may be locked into RAM

MAX_LOCKED_MEMORY=unlimited

Check Out: Install Elastisearch Using Repo

9. Maximum number of VMA (Virtual Memory Areas) a process

MAX_MAP_COUNT=262144

These settings are mandatory if you want to install Elasticsearch otherwise Service won’t work.

You’re

Sponsored

LEAVE A REPLY

Please enter your comment!
Please enter your name here

20 − five =