您的当前位置:首页>全部文章>文章详情

【ElasticSearch】Elaticsearch8.9.0安装配置集群

CrazyPanda发表于:2024-08-06 15:03:07浏览:238次TAG: #Elasticsearch
  1. 下载安装包
    从官网下载8.9.0安装包

# elasticsearch-8.9.0-x86_64.rpm  filebeat-8.9.0-x86_64.rpm  kibana-8.9.0-x86_64.rpm
  1. 安装
    系统环境查看

# cat /etc/redhat-release 
Rocky Linux release 9.3 (Blue Onyx)
# uname -a
Linux Rocky9Es01003089 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

本次使用两台主机安装集群
安装elasticsearch

# rpm -ivh elasticsearch-8.9.0-x86_64.rpm

修改配置文件
node-1

# cat /etc/elasticsearch/elasticsearch.yml 
# 集群名两台主机配置需要一致
cluster.name: my-es
# 本机node名两台主机配置需要不同
node.name: node-1
# 数据路径和日志路径,如果启动失败需要把这两个文件夹的权限设置属组为elasticsearch
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
# 需要设置为0.0.0.0否则集群无法通信
network.host: 0.0.0.0
# 设置集群节点地址,本次有两个节点
discovery.seed_hosts: ["192.168.3.89", "192.168.3.90"]

# 关闭认证,默认以下两处为true
xpack.security.enabled: false

xpack.security.enrollment.enabled: false

xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# 该配置为安装elasticsearch时默认获取配置无需修改
cluster.initial_master_nodes: ["Rocky9Es01003089"]

http.host: 0.0.0.0

node-2

# cat /etc/elasticsearch/elasticsearch.yml 
cluster.name: my-es
node.name: node-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
discovery.seed_hosts: ["192.168.3.89", "192.168.3.90"]


xpack.security.enabled: false

xpack.security.enrollment.enabled: false

xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
cluster.initial_master_nodes: ["Rocky9Es02003090"]

http.host: 0.0.0.0

启动

# systemctl daemon-reload
# systemctl start elasticsearch.service 
# systemctl status elasticsearch.service
# systemctl status elasticsearch.service

查看健康集群状态

# curl http://192.168.3.89:9200/_cat/health
1721182822 02:20:22 my-es green 2 2 42 21 0 0 0 0 - 100.0%
  1. kibana配置文件

# sed \'/#/d\' /etc/kibana/kibana.yml | sed \'/^$/d\'
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://192.168.3.89:9200"]
logging:
  appenders:
    file:
      type: file
      fileName: /var/log/kibana/kibana.log
      layout:
        type: json
  root:
    appenders:
      - default
      - file
pid.file: /run/kibana/kibana.pid

原文链接https://www.hzhcontrols.com/new-2217224.html

猜你喜欢

【ElasticSearch】ElasticSearch | ES常用查询命令汇总
原文链接https://zhuanlan.zhihu.com/p/651152005今天和大家分享ES中的查询命令。相信大家对SQL查询很熟悉,但是你知道如何在ES中实现SQL的select、where、group by等功能吗?下面分享一些ES中常用的查询命令,希望对你有所帮助。1.实现select功能:_source1.1 选择需要的字段GET dws_person_info/_search {    "_source":&nbs
发表于:2024-07-29 浏览:242 TAG:
【数据库】MongoDB特点
MongoDB是一个基于分布式文件存储的开源数据库系统,其中主要特点包括:高性能:MongoDB提供高性能的数据插入和查询操作。高扩展性:MongoDB支持自动分片,可以横向扩展数据库的大小。易于使用:MongoDB支持多种编程语言,并提供简单易用的查询语言。五模式:MongoDB是无模式的,意味着它不要求数据结构严格遵守预定义的模式。复制集:MongoDB提供复制集功能,可以保证数据的高可用性。内置分析功能:MongoDB提供内置的数据分析功能,可以帮助开发者分析数据库性能。以下是一个简单的M
发表于:2024-06-20 浏览:227 TAG:
【ElasticSearch】Elasticsearch 操作语法全解
一个开源的分布式搜索引擎,可以用来实现搜索、日志统计、分析、系统监控等功能
发表于:2024-07-29 浏览:280 TAG: #Elasticsearch
【ElasticSearch】Elaticsearch8.9.0安装配置集群
下载安装包从官网下载8.9.0安装包# elasticsearch-8.9.0-x86_64.rpm  filebeat-8.9.0-x86_64.rpm  kibana-8.9.0-x86_64.rpm安装系统环境查看# cat /etc/redhat-release  Rocky Linux release 9.3 (Blue Onyx) # uname
发表于:2024-08-06 浏览:239 TAG: #Elasticsearch
【ElasticSearch】Elasticsearch常用工具清单
一、基础类工具1、Head插件  ES集群状态查看、索引数据查看、ES DSL实现(增、删、改、查),比较适用json串的格式化  参考地址:http://mobz.github.io/elasticsearch-head/2、kibana工具  除了支持各种数据的可视化之外,最重要的是:支持Dev Tool进行RESTFUL API增删改查操作。  ——比Postman工具和curl都方便很多。  参考地址:https://www.elasti
发表于:2024-07-29 浏览:263 TAG:
【Elasticsearch】linux安装Elasticsearch及ik分词器
1. 资料准备环境:docker创建的宝塔lnmpes下载地址https://www.elastic.co/cn/downloads/past-releases#elasticsearchik下载地址https://release.infinilabs.com/analysis-ik/stable/ es和ik下载对应的版本,这里我下载的版本都是8.13.42. 安装elasticsearch由于我是宝塔部署的环境,所以直接将es解压到了/www/elasticsearch目录,解压完成后,在e
发表于:2024-08-15 浏览:248 TAG: #Elasticsearch