详解 ElasticSearch 集群搭建

news/2024/7/7 6:36:08 标签: elasticsearch, 大数据, 搜索引擎, java, python
🌹 以上分享 ElasticSearch 安装部署,如有问题请指教写。
 
🌹🌹 如你对技术也感兴趣,欢迎交流。
 
🌹🌹🌹  如有需要,请👍点赞💖收藏🐱‍🏍分享 

 

linux 配置 elastictsearch集群

 详解 ElasticSearch Kibana 配置部署_PJ码匠人的博客-CSDN博客Elasticsearch 安装,配置文件参数修改,错误修复,用户验证,kibana安装配置,参数设置https://meyan.blog.csdn.net/article/details/132580977

windows  配置 elastictsearch集群

链接:https://pan.baidu.com/s/1V7jxVhUFvsINrH7zz9Laeg?pwd=n9cx 
提取码:n9cx 

配置节点9201 

配置文件 

# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
#
# 集群名(集群中的节点通过节点名确认同一集群)
cluster.name: elasticsearch
#
# ------------------------------------ Node ------------------------------------
#
# 节点名
node.name: node-9201
# 节点是否可做主节点
node.master: true
# 节点是否可做数据节点
node.data: true
#
# 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: E:\elasticsearch7_cluster/data
#
# Path to log files:
#日志保存地址
path.logs: E:\elasticsearch7_cluster/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
# 是否需要在服务启动时锁定内存
#bootstrap.memory_lock: true
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
#设定绑定地址
network.host: localhost
#
# Set a custom port for HTTP:
#设置客户端端口
http.port: 9201
# 集群间交互端口
transport.tcp.port: 9301
# --------------------------------- Discovery ----------------------------------
#
# The default list of hosts is ["127.0.0.1", "[::1]"]
#设置初始对外访问地址默认 ["127.0.0.1", "[::1]"]
#discovery.seed_hosts: ["host1", "host2"]
#
#设置初始化主节点
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#设置服务节点数启动后才启动
#gateway.recover_after_nodes: 3
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
# 跨域设置
http.cors.enabled: true
http.cors.allow-origin: "*"

启动服务

错误 

 解决方法

将配置文件用utf8格式另存然后覆盖当前配置文件即可

启动成功 

 查看集群健康状态

配置节点9202

 配置文件

# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
#
#
cluster.name: elasticsearch
#
# ------------------------------------ Node ------------------------------------
#
#
node.name: node-9202
node.master: true
node.data: true
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
#
#bootstrap.memory_lock: true
#
#
# ---------------------------------- Network -----------------------------------
#
#
network.host: localhost
#
http.port: 9202
transport.tcp.port: 9302
# 发现主节点
discovery.seed_hosts: ["localhost:9301"]
# 超时时间 一分钟
discovery.zen.fd.ping_timeout: 1m
# 重试次数
discovery.zen.fd.ping_retries: 5
#
#
# --------------------------------- Discovery ----------------------------------
#
#discovery.seed_hosts: ["host1", "host2"]
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# ---------------------------------- Gateway -----------------------------------
#
#gateway.recover_after_nodes: 3
#
# ---------------------------------- Various -----------------------------------
#
#action.destructive_requires_name: true
http.cors.enabled: true
http.cors.allow-origin: "*"

启动9202

 

配置节点9203 

配置文件 

# ======================== Elasticsearch Configuration =========================
# ---------------------------------- Cluster -----------------------------------
#
#
cluster.name: elasticsearch
#
# ------------------------------------ Node ------------------------------------
#
#
node.name: node-9203
node.master: true
node.data: true
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
#
#bootstrap.memory_lock: true
#
#
# ---------------------------------- Network -----------------------------------
#
#
network.host: localhost
#
http.port: 9203
transport.tcp.port: 9303

#
#
# --------------------------------- Discovery ----------------------------------
#
# 节点发现
discovery.seed_hosts: ["localhost:9301","localhost:9302"]
# 超时时间 一分钟
discovery.zen.fd.ping_timeout: 1m
# 重试次数
discovery.zen.fd.ping_retries: 5
#
#cluster.initial_master_nodes: ["node-1", "node-2"]
#
# ---------------------------------- Gateway -----------------------------------
#
#gateway.recover_after_nodes: 3
#
# ---------------------------------- Various -----------------------------------
#
#action.destructive_requires_name: true
http.cors.enabled: true
http.cors.allow-origin: "*"

 启动9203


http://www.niftyadmin.cn/n/5096548.html

相关文章

Python问答题(更新中)

1. 列表(list)和元组(tuple)有什么区别? 列表是可变的,创建后可以对其进行修改;元组是不可变的,元组一旦创建,就不能对其进行更改。列表表示的是顺序。它们是有序序列&a…

uni.scanCode不支持h5扫码(用拍照或者获取相册识别二维码和条码)

用微信扫码uni.scanCode 经过官网查询不支持h5 经过网上查询可以引入QuaggaJS库来实现识别条码 实现h5识别二维码我是参考无名咸鱼的博客 QuaggaJS官网 QuaggaJS 官网地址 quaggaJS GitHub 地址 用npm 安装 先安装 npm install quagga如有需要看详情去官网查看 引入 i…

搜索引擎-在URL地址栏输入信息,不跳转

在URL地址栏输入信息,不跳转 原因解决待续 原因 因为没有使用某个搜索引擎,无法定位到资源 解决 先打开百度或搜狗其他引擎,在输入内容,跳转成功 待续 ————————————————————— 以上就是今日博客的全部内容…

数字化转型“同群效应”(2000-2022年)

参照霍春辉等(2023)的做法,团队对上市公司-数字化转型“同群效应”进行测算。将同行业、同省的其他企业定义为同群企业,并以该群体数字化转型程度均值、中位数作为衡量 一、数据介绍 数据名称:数字化转型“同群效应”…

K 近邻算法解析: 从原理到实践的机器学习指南

机器学习 第三课 k 近邻 概述机器学习简介K 近邻算法K 近邻中的距离欧氏距离曼哈顿距离余弦相似度 选择合适的 K 值奇数 vs 偶数通过交叉验证选择 k 值 实战分类问题回归问题 K 近邻算法的优缺点优点缺点 手把手实现 k 近邻手搓算法实战分类 概述 机器学习 (Machine Learning)…

谈谈什么是缓存穿透,缓存击穿,缓存雪崩?怎么解决?

谈谈什么是缓存穿透,缓存击穿,缓存雪崩?怎么解决? 缓存穿透 ● 是指:客户端请求的数据在缓存中和数据库中都不存在,所有的请求都打到了数据库上面。 ● 解决方案: ○ 缓存空对象 ■ 优点&#x…

CentOS+宝塔 通过php脚本+shell脚本+定时任务 = 自动拉取代码git pull

效果 访问 http://demo.com/gitPull/index.php 即可让Linux系统自动到指定目录git pull 实现步骤 准备好shell脚本 #!/bin/bash # 伺服器-监视拉取代码请求 # Author: RudonFILE/www/wwwroot/demo.com/gitPull/go.action LOGPATH/www/wwwroot/demo.com/gitPull/log.log dateN…

浅谈当下7个网页设计趋势 优漫动游

2.全屏网页设计(FullScreenDesign) 所谓设计不分家,近年来平面设计里“纯净”“留白”等概念也被互联网设计吸取,为了更简单明了的突出主体,提供更舒适的感官感受,很多网站开始采用全屏网页设计&#xff…