Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation and configuration tutorial for elasticsearch Cluster

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

What this article shares to you is the installation and configuration tutorial of elasticsearch cluster. I believe most people do not know how to install it. In order to let you learn, I have summarized the following contents. Without saying much, let's read on.

Steps:

Prepare three servers (the cluster of es cannot be less than three, otherwise it will not be set up)

1. Configure jdk

1) check whether jdk1.8 is installed, with the following command:

Rpm-qa | grep jdk

2) install jdk1.8

3) jdk1.8 configuration file:

Vim / etc/profile

Add the following configuration: configure according to the installation path

Export JAVA_HOME=/usr/java/jdk1.8.0_161/

Export PATH=$PATH:$JAVA_HOME/bin

Source / etc/profile configuration takes effect

Second, install es

1) cd / etc/elasticsearch/

Vim elasticsearch.yml

2) add the configuration file as follows:

For convenience, I pasted a copy directly:

# Cluster name, which needs to be modified

Cluster.name: Es-lmy

# cannot be repeated, it can be numbered sequentially, or it can be configured automatically

Node.name: node-3

# path to the directory where the data is stored (multiple locations separated by commas)

Path.data: / dev/shm/new_core/63/data

# Log storage path

Path.logs: / dev/shm/new_core/63/logs

# bind listening IP

Network.host: native IP address

# set the port for interaction between nodes

Http.port: 9200

Transport.tcp.port: 9300

# initial list of master nodes

Discovery.zen.ping.unicast.hosts: ["xxxx", "xxxx", "xxxx",] IP address of the cluster

# master qualified nodes

Discovery.zen.minimum_master_nodes: 1

# index.number_of_shards: 8

# set the number of copies of the index. The default is 1. Increasing the number of copies can improve search performance:

# index.number_of_replicas: 5

# probe timeout

# discovery.zen.ping.timeout: 5s

# avoid cluster fake death when querying too frequently

# index.cache.field.type: soft

# only do data search

# node.master: false

# node.data: false

# node.ingest: true

Note:

Do not repeat node.name names. Numeric names can be added for convenience.

Remember to create the log storage path and the data storage path in advance, otherwise start the cluster to report an error

Other versions of es can directly configure the copy and index in the configuration file. Because my installation version does not support it, you need to use the command.

3) modify the maximum number of threads vim / etc/security/limits.conf, and add the following in the last line:

Elasticsearch-nproc 2048

4) modify jvm memory, allocate 16G, vim jvm.options

5) create an es directory with the following command:

Mkdir-p / dev/shm/new_core/111/data

Mkdir-p / dev/shm/new_core/111/logs

Chown-R elasticsearch:elasticsearch / dev/shm/new_core/111/

6) check the cluster status

Curl 'x.x.x.xpur9200 racket catchin nodeskeeper v'

For more information:

How to realize data synchronization in Elasticsearch Cluster

A deep analysis of the principle of ElasticSearch cluster

Now that the cluster is installed and configured, have you learned the installation and configuration of the elasticsearch cluster? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report