当前位置: 首页 > news >正文

从入门到进阶 之 ElasticSearch 节点配置 集群篇

🌹 以上分享 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.lryc.cn/news/197072.html

相关文章:

  • UE4中无法保存项目问题
  • 解剖—顺序表相关OJ练习题
  • NAT网关在阿里云的应用
  • 操作系统体系结构和OS
  • Flutter ☞ 常量
  • C++ 配置VSCode开发环境
  • Arduino_STM32整理贴
  • MoeCTF 2023 Web+Jail wp
  • 494.目标和 474.一和零
  • 模拟电源与数字电源之间的区别
  • P5461 赦免战俘
  • 【工具】转码silk格式为mp3
  • 蓝桥杯每日一题2023.10.18
  • 大数据开发中的秘密武器:探索Hadoop纠删码的奇妙世界
  • 华为数通方向HCIP-DataCom H12-831题库(单选题:301-310)
  • Vite 踩坑 —— require is not defined
  • 彻底理解操作系统与内核的区别!
  • 微信小程序4
  • OpenCV14-图像平滑:线性滤波和非线性滤波
  • kafka_2.10启动Kafka broker
  • 【配置环境】SQLite数据库安装和编译以及VS下C++访问SQLite数据库
  • Confluence 自定义展示页面
  • 使用C#的Socket从头实现的带有文件上传和下载功能的HTTP服务器
  • 【OSPF Loading、FULL状态与display ospf peer brief命令、OSPF的数据库讲解】
  • 除氟树脂在工业、市政含氟废水处理中的应用
  • 模拟地和数字地的区别
  • Druid连接池最小连接数设置失效问题
  • Javascript数据类型和类型转换
  • 冲刺十五届蓝桥杯P0005单词分析
  • php获取10年内的年份并加入下拉列表