Windows10单机部署Elasticsearch集群

Windows环境下es8的集群部署 目录1 相关概念1.1 单机集群1.2 集群Cluster1.3 节点Node2 Windows下部署2.1 节点node-10012.2 节点node-10022.3 节点node-1003单台Elasticsearch服务器提供服务,往往都有最大的负载能力,超过这个阀值,服务器新能就会大大降低不可用,所以生产环境中,一般都是运行在指定服务器集群中。除了负载能力,单点服务器也存在其他问题:配置服务器集群时,集群中节点数量没有限制,大于等于两个节点就能够看做集群了,一般出于高性能和高可用来说集群节点数量都是 阅读详情

按照如下步骤执行即可成功在本地部署集群:

1. 官网下载es包(该步骤省略)

下载后的包长这样:
在这里插入图片描述

2. 正式集群前先看看有没有官方文档可以参考,于是在文档中发现如下资料:

  • Set up a new Elasticsearch instance.
  • Specify the name of the cluster with the cluster.name\color{#FF3030}cluster.namecluster.name setting in elasticsearch.yml\color{#FF3030}elasticsearch.ymlelasticsearch.yml. For example, to add a node to the logging-prod cluster, add the line cluster.name: “logging-prod” to elasticsearch.yml.
  • Start Elasticsearch. The node automatically discovers and joins the specified cluster.

我们来解读一下官方文档:

  • 安装一个新的Elasticsearch实例,也就是说将下载后的压缩包复制一份并解压作为第二个ES实例,特别需要注意的是,如果目前你机器里已经有一份ES实例,而且里面有数据,那么如果你直接复制该实例文件夹作为第二个实例,就算改了第二个实例的配置文件,启动后也可能出现集群里只有一个节点,因为两个节点ID会相同。
  • 在elasticsearch.yml\color{#FF3030}elasticsearch.ymlelasticsearch.yml配置文件里面配置集群名,它对应的key是cluster.name\color{#FF3030}cluster.namecluster.name
  • 启动ES

3. 实战:

按照上述的第一个步骤后,得到下面三个文件夹
在这里插入图片描述
分别对应三个Node。

按照步骤二,需要对每个节点进行配置,配置文件如下:
node1配置文件:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 127.0.0.1
#
# Set a custom port for HTTP:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["127.0.0.1:9300","127.0.0.1:9301"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

node2配置文件:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-2
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
http.port: 9201
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

node3配置文件:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: my-application-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-3
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
#network.host: 192.168.0.1
#
# Set a custom port for HTTP:
#
http.port: 9202
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true

可以看出:这三个配置文件只有三个地方不同,分别如下:

  • cluster.name:集群名
  • node.name:当前节点名
  • http.port:当前节点访问端口

其他配置暂时不需要设置。

4. 分别启动三个实例:

例如在node1里面执行下面的批处理文件即可启动该节点:
在这里插入图片描述
其他节点启动步骤相同,不再赘述。

5. 通过ES插件Elasticsearch Head查看集群状态如下:

在这里插入图片描述
可以看到,集群健康状态是green\color{#7FFF00}greengreen,代表集群部署成功。

ElasticSearch7集群搭建(Windows单机版) ElasticSearch名为分布式搜索引擎,所以为了实现高可用,ElasticSearch一般是要搭建集群环境的。 这里我们只在一台电脑上搭建三个ElasticSearch客户端来建立伪分布式就可以开始我们的学习之旅了。 一.解压压缩包 我们直接多解压两份elasticsearch-7.4.2-windows-x86_64.zip压缩包再修改名字就行了: 二.修改配置文件 ... 阅读详情

相关推荐

重带电粒子的能量歧离(energy straggling)

能量歧离,Bethe-Bloch

G751888629的博客 2298

window10下elasticsearch创建集群方法(本地)

ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。搜索采用 倒排索引,也叫反向索引(正向索引是通过key找value,反向索引则是通过value找key)。 一、elasticsearch下载 首先去官网下载 elasticsearch 官网地址:https://www.elastic.co/cn/downlo...

song&life 975

C++学习(四六六)Multiple parse contexts are available for this file

Note: Multiple parse contexts are available for this file. Choose the preferred one from the editor menu 参考: "Multiple parse contexts" in Qt creator | Qt ForumHi Do you use sessions? https://bugreports.qt.io/browse/QTCREATORBUG-18521 Anyway, its not.

hankern的专栏 4610

Win10-Elasticsearch单机/集群部署

Win10-Elasticsearch安装 ES单机部署 ES全称Elasticsearch,Elasticsearch是一个分布式、RESTful 风格的搜索和数据分析引擎,能够解决不断涌现出的各种用例。 作为 Elastic Stack 的核心,它集中存储您的数据,帮助您发现意料之中以及意料之外的情况,安装也很简单 下载安装包 从Elasticsearch官网下载安装包,选择Win版本 解压安装包 下载完毕后直接解压 启动 注意:Elasticsearch最低支持JDK8,如果你所使用

JolyouLu的博客 1430

Logisim实战:手把手教你设计硬布线版MIPS CPU(多周期/8指令/附电路图)

本文是一份详细的Logisim实战指南,手把手教你设计一个采用硬布线控制的多周期MIPS CPU。文章深入剖析了硬布线控制与微程序控制的核心理念差异,并逐步讲解了从定义执行状态、构建状态跳转逻辑到生成控制信号、集成测试的完整流程,最终实现一个支持8条指令、可运行简单程序的处理器模型。

g9h0i1的博客 592

Win10家庭版没有Hyper-V?教你一招轻松解决(含避坑指南)

本文详细介绍了在Win10家庭版中启用Hyper-V的完整实战指南。通过DISM工具链绕过系统版本限制,无需重装系统即可完整启用所有Hyper-V组件,适用于开发者测试多系统环境和安全隔离应用场景。文章包含详细操作步骤、常见问题解决方案及性能优化配置,帮助用户轻松解决Win10家庭版没有Hyper-V的问题。

weixin_29239661的博客 495

Windows10 搭建 ElasticSearch 集群服务

一、前言   集群的搭建需要多台机器,之前我使用 ubuntu 16.04 搭建过 hadoop 的单机模式和分布式模式,这个今后会写,今天先写一篇使用 《 Windows10 搭建 ElasticSearch 集群服务 》供大家参考!   需要注意的是:在 win 10 上部署多个 elasticsearch 节点 ,每个 elasticsearch 的端口都必须不一样。 ...

av0351的博客 494

UG二次开发避坑指南:如何正确配置Python环境让NXOpen脚本跑起来?

本文详细介绍了UG/NX二次开发中Python环境配置的全流程与NXOpen脚本调试技巧,帮助开发者避开常见陷阱。从NXOpen架构解析到Python解释器版本匹配,再到环境变量设置与路径问题处理,提供了一套经过验证的配置方案,确保脚本顺利运行。

weixin_33859135的博客 448

基于 Win10 平台 搭建 Elasticsearch 集群

基于 Win10 平台搭建 Elasticsearch 集群1. 基本概念1.1 单机和集群1.2 节点2. 部署集群3. 启动集群4. 测试集群 1. 基本概念 1.1 单机和集群 ✨单台 Elasticsearch 服务器提供服务,往往都有最大的负载能力,超过这个阈值,服务器性能就会大大降低甚至不可用。因此,在生产环境中,一般都是运行在指定服务器集群中。 🎉除了负载能力,单点服务器也存在其他问题: 🎈单台机器存储容量有限 🎈单服务器容易出现单点故障,无法实现高可用 🎈单服务的并发处理能力有限 ✨配置

华仔仔的博客 1146

移远EC800M CAT1模块HTTP POST实战:从AT指令到数据上报的完整避坑指南

本文详细介绍了移远EC800M CAT1模块通过AT指令实现HTTP POST数据上报的完整开发流程,包括模块初始化、PDP上下文配置、HTTP POST实现及优化策略。针对实际开发中的常见问题如网络异常、低功耗需求等提供了经过验证的解决方案,帮助开发者快速实现稳定可靠的物联网数据传输功能。

weixin_42556197的博客 479

[27] cuda 应用之 核函数实现图像通道变换

[27] cuda 应用之 核函数实现图像通道变换

yohnyang的博客 202

elasticsearch集群搭建

主机搭建es集群,三台服务器快速搭建步骤

DriedTears的博客 481

如何使用Python爬取并保存网页上的所有附件

爬虫(Crawler)是一种自动化程序,它通过模拟人工访问网页并下载网页上的数据或文件,常用于数据采集和分析。爬虫通常以“爬取”的形式自动浏览和提取网页中的各种信息。本文详细介绍了如何使用Python爬取并保存网页中的附件文件,涵盖了网页解析、文件下载、多线程与异步优化等内容。希望通过本文的讲解,能够帮助你理解并掌握附件爬取的技巧。在实际应用中,爬虫开发不仅需要解决技术问题,还要遵守网络道德和法律法规,避免不当使用爬虫造成负面影响。

2201_76125261的博客 966

windows部署集群的ES、linux单机、linux集群(超详细)

windows环境集群搭建、linux单机、linux集群环境详细图文

weixin_49186526的博客 1375

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

Elasticsearch Windows单机集群部署

Elasticsearch Windows单机集群部署Elasticsearch下载Elasticsearch安装Elasticsearch.yml修改安装ElasticSearch-headElasticsearch安装成Windows服务 Elasticsearch下载 ElasticSearch是基于lucence开发的,运行需要java jdk支持。 由于ElasticSearch 5.x 往后依赖于JDK 1.8的,需要下载JDK 1.8或者更高版本。 JDK的下载、安装和环境配置教程(2021年

wlqyyyyy的博客 597

IDEA的使用指南

IDEA基于java的使用手册,可以最快速的上手,在使用中不断的丰富自己的使用技巧.

ElasticSearch入门篇(1):windows环境搭建ES集群

  近期在学习ElasticSearch,便在windows下搭建了一个分布式集群,练习一些常用的DSL(类似于SQL)和Java API。 1. 安装包下载   官方网址:https://www.elastic.co/cn/downloads/  ES下载地址:https://www.elastic.co/cn/downloads/elasticsearch Kibana下载地址:https://www.elastic.co/cn/downloads/kibana   下载windows版本的安装包,我本

Zero小猿的博客 4102

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

【ES】[教程]----第一章:Elasticsearch 安装(linux 、windows 、单机、集群)

本文介绍了Elasticsearch 7.8.0版本在Linux和Windows系统下的安装部署方法。主要内容包括:Linux单机安装(创建用户、修改配置文件、启动验证)、Linux集群部署(节点配置、集群参数设置)以及Windows单机安装的基本步骤。重点讲解了Linux环境下的系统配置优化,如修改文件描述符限制、虚拟内存设置等,并提供了详细的命令操作和配置文件修改示例。集群部署部分详细说明了节点发现、主节点选举等关键参数的配置方法。

记录生活 724

大数据之ES:简介与Window部署、Linux单机和Linux集群部署以及集群部署问题

记录下,部分叙述说明参考网上资源和尚硅谷开放资源,如有侵权,请联系删除 文章目录简介全文搜索引擎Elasticsearch And SolrES OR SolrElasticsearch 应用案例安装部署Windows安装Linux单机安装Linux集群安装集群启动异常问题集群不能发现数据格式映射 简介 ES是分布式、RESTful风格的搜索和数据分析引擎。作为The Elastic Stack的核心 The Elastic Stack, 包括 Elasticsearch、Kibana、Beats 和 .

maoyuanming0806的博客 1476

3.ElasticSearch - 集群部署

单台 Elasticsearch 服务器提供服务,往往都有最大的负载能力,超过这个阈值,服务器性能就会大大降低甚至不可用。

weixin_51351637的博客 1093

【Elasticsearch】集群部署

本文主要从三个角度讲述了ES的集群部署

al6nlee的博客 1841

ElasticSearch全文搜索引擎之Windows集群搭建

目录 一、为什么要搭建集群 二、Windows搭建ES集群 一、为什么要搭建集群 在搭建ElasticSearch集群之前,首先得搞明白我们为什么需要搭建集群?它有什么优势呢?ES单机部署为什么不行? (1)高可用性 众所周知,搭建集群最明显的优点就是提供我们的高可用性,无论是之前学习的Redis集群,Eureka集群等等,单机版部署只适合我们自己学习使用,真正到了生产环境很少会单机部署某个服务,基本上都是集群部署,保证单台机器宕机时不会导致我们服务不可用。 Elasticsearch 作为一个

weixiaohuai的博客 815

elasticsearch7.X.X windows单机伪集群

转载请表明出处 谢谢 elasticsearch7.X.X windows单机伪集群安装下载Java下载 Elasticsearch分词集群配置启动 安装下载 Java 在安装 Elasticsearch 之前,您需安装并配置好 JDK(jdk8+), 设置好环境变量 $JAVA_HOME。 下载 Elasticsearch 官网 下载zip文件 , 然后解压 分词 中文分词 githu...

SophiaLeo的博客 887

elasticsearch+minio(Windows)单机安装部署

elastic+minio安装

Princekin_的博客 884

elasticsearch 7.16.2 单机部署及密码认证

elasticsearch 7.16.2 单机部署及密码认证一、部署前准备1、ulimit 调优二、部署ES单机 一、部署前准备 1、ulimit 调优 可以使用ulimit -n 查看当前设置的用户可以打开文件的最大数目,默认是1024,不修改ES启动时会报错 代表针对所有用户,noproc 是代表最大进程数,nofile 是代表最大文件打开数 cat >> /etc/security/limits.conf << EOF * hard mem

码海小虾米_的博客 2763

Kafka: Windows环境-单机部署和伪集群、集群部署

initLimit:这个配置项是用来配置 Zookeeper 接受客户端(这里所说的客户端不是用户连接 Zookeeper 服务器的客户端,而是 Zookeeper 服务器集群中连接到 Leader 的 Follower 服务器)初始化连接时最长能忍受多少个心跳时间间隔数。在windows环境中,文件路径必须是 "\" 或者 "//" ,“/” 是无法识别的。(3)创建data、logs目录,并在data目录下新建myid用于集群服务,里面内容填写当前主机id,我是三台服务器的集群,id分别为1,2,3。

喜欢历史的码农 1337
上一篇: mybatis中在同一个事务,循环执行同一个sql语句,只有第一次会执行的问题
下一篇: kafka简介与架构设计
Absosba
博客等级 码龄11年 20粉丝 20原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值