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

How to install elasticSearch7.9 cluster under window

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "how to install elasticSearch7.9 cluster under window". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to install elasticSearch7.9 cluster under window.

I. Software environment

Win 10

ElasticSearch 7.9.0

Cerebro 0.9.2

II. Software download

ElasticSearch download address: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.0-windows-x86_64.zip

Cerebro download address: https://github.com/lmenezes/cerebro/releases

3. Decompress elasticSearch 7.9.0

3.1 node-9200 node configuration

# set the cluster name. The names of all nodes in the cluster must be the same. Cluster.name: my-esCluster# sets the node name, which must be unique within the cluster. Node.name: node-9200# indicates whether the node will be the master node, and true indicates that it will. False means no node.master: whether the current node of true# is used to store data, yes: true, No: falsenode.data: location where true# index data is stored # path.data: / opt/elasticsearch/data# log file storage location # path.logs: / opt/elasticsearch/logs# needs to lock physical memory, yes: true, No: false#bootstrap.memory_lock: true# listening address It is used to access the http port provided by the esnetwork.host: 127.0.0.The es. The default listening port is 9200http.port: 920 TCP, and the default 9300transport.tcp.port: 930 ports is set to ensure that the nodes in the cluster can know about the other N master qualified nodes. The default is 1. For large clusters, you can set a larger value (2-4) discovery.zen.minimum_master_nodes: write the device address of the candidate master node to the new configuration after es7.x. After enabling the service, it can be selected as the master node discovery.seed_hosts: ["127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9302") This configuration is required to initialize a new cluster to elect mastercluster.initial_master_nodes: ["node1", "node2", "node3"] # whether cross-domain support is: true This configuration is required when using the head plug-in http.cors.enabled: true# "*" means all domain names are supported: http.cors.allow-origin: "*" action.destructive_requires_name: trueaction.auto_create_index: .security, .domains *, .powered _ watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false

3.1 node-9201 node configuration

# set the cluster name. The names of all nodes in the cluster must be the same. Cluster.name: my-esCluster# sets the node name, which must be unique within the cluster. Node.name: node-9201# indicates whether the node will be the master node, and true indicates that it will. False means no node.master: whether the current node of true# is used to store data, yes: true, No: falsenode.data: location where true# index data is stored # path.data: / opt/elasticsearch/data# log file storage location # path.logs: / opt/elasticsearch/logs# needs to lock physical memory, yes: true, No: false#bootstrap.memory_lock: true# listening address It is used to access the http port provided by the esnetwork.host: 127.0.0.The es. The default listening port is 9200http.port: 920 TCP, and the default 9300transport.tcp.port: 930 ports is set to ensure that the nodes in the cluster can know about the other N master qualified nodes. The default is 1. For large clusters, you can set a larger value (2-4) discovery.zen.minimum_master_nodes: write the device address of the candidate master node to the new configuration after es7.x. After enabling the service, it can be selected as the master node discovery.seed_hosts: ["127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9302") This configuration is required to initialize a new cluster to elect mastercluster.initial_master_nodes: ["node1", "node2", "node3"] # whether cross-domain support is: true This configuration is required when using the head plug-in http.cors.enabled: true# "*" means all domain names are supported: http.cors.allow-origin: "*" action.destructive_requires_name: trueaction.auto_create_index: .security, .domains *, .powered _ watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false

3.1 node-9202 node configuration

# set the cluster name. The names of all nodes in the cluster must be the same. Cluster.name: my-esCluster# sets the node name, which must be unique within the cluster. Node.name: node-9202# indicates whether the node will be the master node, and true indicates that it will. False means no node.master: whether the current node of true# is used to store data, yes: true, No: falsenode.data: location where true# index data is stored # path.data: / opt/elasticsearch/data# log file storage location # path.logs: / opt/elasticsearch/logs# needs to lock physical memory, yes: true, No: false#bootstrap.memory_lock: true# listening address It is used to access the http port provided by the esnetwork.host: 127.0.0.The es. The default listening port is 9200http.port: 920 TCP, and the default 9300transport.tcp.port: 930 ports is set to ensure that the nodes in the cluster can know about the other N master qualified nodes. The default is 1. For large clusters, you can set a larger value (2-4) discovery.zen.minimum_master_nodes: write the device address of the candidate master node to the new configuration after es7.x. After enabling the service, it can be selected as the master node discovery.seed_hosts: ["127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9301", "127.0.0.1 1mdiscovery.zen.fd.ping_retries 9302") This configuration is required to initialize a new cluster to elect mastercluster.initial_master_nodes: ["node1", "node2", "node3"] # whether cross-domain support is: true This configuration is required when using the head plug-in http.cors.enabled: true# "*" means all domain names are supported: http.cors.allow-origin: "*" action.destructive_requires_name: trueaction.auto_create_index: .security, .domains *, .powered _ watches,.watcher-history*xpack.security.enabled: falsexpack.monitoring.enabled: truexpack.graph.enabled: falsexpack.watcher.enabled: falsexpack.ml.enabled: false

4. Start three elasticSearch respectively. After the startup is completed, the following message indicates that the cluster is successful.

5. Install the cluster node management tool cerebro

To decompress and run, type http://localhost:9000 in the browser

Enter node address

Click Connect to view the status of nodes in the cluster

# the following has nothing to do with this article #

@ Configurationpublic class ElasticConfig extends AbstractElasticsearchConfiguration {@ Value ("${elasticSearch.host.port}") private String hostAndPort; @ Value ("${elasticSearch.user}") private String user; @ Value ("${elasticSearch.password}") private String password; @ Value ("${elasticSearch.socketTimeout}") private long socketTimeout @ Override @ Bean public RestHighLevelClient elasticsearchClient () {final ClientConfiguration clientConfiguration = ClientConfiguration.builder () .connectedTo (hostAndPort) .withBasicAuth (user, password) .withSocketTimeout (Duration.ofSeconds (socketTimeout)) .build (); return RestClients.create (clientConfiguration) .rest () } @ Bean public ElasticsearchRestTemplate restTemplate () throws Exception {return new ElasticsearchRestTemplate (elasticsearchClient ());}} Thank you for reading. The above is the content of "how to install elasticSearch7.9 clusters under window". After the study of this article, I believe you have a deeper understanding of how to install elasticSearch7.9 clusters under window, and the specific usage needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report