容器化部署目前最新版本的Elasticsearch--8.15.1

news/2025/1/15 15:07:47/文章来源:https://www.cnblogs.com/guangdelw/p/18405620

Elasticsearch 简介

Elasticsearch 是一个实时的分布式搜索和分析引擎,它可以用于全文搜索,结构化搜索以及分析,采用Java语言编写。

目前,最新的版本是Elasticsearch 8.3.0,它的主要特点如下:

  • 实时搜索,实时分析

  • 分布式架构、实时文件存储,并将每一个字段都编入索引

  • 文档导向,所有的对象全部是文档

  • 高可用性,易扩展,支持集群(Cluster)、分片和复制(Shards和Replicas)

  • 接口友好,支持JSON

官网 https://www.elastic.co/cn/elasticsearch

下载入口 https://www.elastic.co/cn/downloads/elasticsearch

kibana介绍

通常 Elasticsearch 和 Kibana 都是协同出现的。
Elasticsearch 提供高效的全文搜索和分析引擎;
而 Kibana 则提供搜索、可视化汇总和多维度分析的能力,还可以与Elasticsearch搜索引擎之中的数据进行交互。
它基于浏览器的界面操作可以快速创建动态仪表板,实时监控ElasticSearch的数据状态与更改。

官网 https://www.elastic.co/cn/kibana

下载入口 https://www.elastic.co/cn/downloads/kibana

环境准备

  • docker
  • linux

linux参数配置

echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
sysctl -p

不配置这个系统参数,会起不来

部署

官方文档 https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

准备文件

  • .env
  • docker-compose.yml

修改配置文件

.env文件

# Password for the 'elastic' user (at least 6 characters)
# ELASTIC_PASSWORD=
# 设置elastic的密码 用户名是 elastic
ELASTIC_PASSWORD=111111# Password for the 'kibana_system' user (at least 6 characters)
# KIBANA_PASSWORD=
# 设置Kibana的web界面的密码 用户名也是 elastic
KIBANA_PASSWORD=111111# Version of Elastic products
# STACK_VERSION={version}
# 这个STACK_VERSION的值
STACK_VERSION=8.15.1# Set the cluster name
CLUSTER_NAME=docker-cluster# Set to 'basic' or 'trial' to automatically start the 30-day trial
LICENSE=basic
#LICENSE=trial# Port to expose Elasticsearch HTTP API to the host
ES_PORT=9200
#ES_PORT=127.0.0.1:9200# Port to expose Kibana to the host
KIBANA_PORT=5601
#KIBANA_PORT=80# Increase or decrease based on the available host memory (in bytes)
# MEM_LIMIT=1073741824
# 也需要修改这里的内存上线 默认是1G
# 可以修改成2G或者4G Elasticsearch是很需要内存的
# 我修改成4G
MEM_LIMIT=4294967296# Project namespace (defaults to the current folder name if not set)
#COMPOSE_PROJECT_NAME=myproject

其他的就不用动了

资源清单文件 docker-compose.yml

version: "2.2"services:setup:image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- certs:/usr/share/elasticsearch/config/certsuser: "0"command: >bash -c 'if [ x${ELASTIC_PASSWORD} == x ]; thenecho "Set the ELASTIC_PASSWORD environment variable in the .env file";exit 1;elif [ x${KIBANA_PASSWORD} == x ]; thenecho "Set the KIBANA_PASSWORD environment variable in the .env file";exit 1;fi;if [ ! -f config/certs/ca.zip ]; thenecho "Creating CA";bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip;unzip config/certs/ca.zip -d config/certs;fi;if [ ! -f config/certs/certs.zip ]; thenecho "Creating certs";echo -ne \"instances:\n"\"  - name: es01\n"\"    dns:\n"\"      - es01\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\"  - name: es02\n"\"    dns:\n"\"      - es02\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\"  - name: es03\n"\"    dns:\n"\"      - es03\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\> config/certs/instances.yml;bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;unzip config/certs/certs.zip -d config/certs;fi;echo "Setting file permissions"chown -R root:root config/certs;find . -type d -exec chmod 750 \{\} \;;find . -type f -exec chmod 640 \{\} \;;echo "Waiting for Elasticsearch availability";until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done;echo "Setting kibana_system password";until curl -s -X POST --cacert config/certs/ca/ca.crt -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" https://es01:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;echo "All done!";'healthcheck:test: ["CMD-SHELL", "[ -f config/certs/es01/es01.crt ]"]interval: 1stimeout: 5sretries: 120es01:depends_on:setup:condition: service_healthyimage: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- certs:/usr/share/elasticsearch/config/certs- esdata01:/usr/share/elasticsearch/dataports:- ${ES_PORT}:9200environment:- node.name=es01- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es02,es03- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es01/es01.key- xpack.security.http.ssl.certificate=certs/es01/es01.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es01/es01.key- xpack.security.transport.ssl.certificate=certs/es01/es01.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1healthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120es02:depends_on:- es01image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- certs:/usr/share/elasticsearch/config/certs- esdata02:/usr/share/elasticsearch/dataenvironment:- node.name=es02- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es01,es03- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es02/es02.key- xpack.security.http.ssl.certificate=certs/es02/es02.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es02/es02.key- xpack.security.transport.ssl.certificate=certs/es02/es02.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1healthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120es03:depends_on:- es02image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- certs:/usr/share/elasticsearch/config/certs- esdata03:/usr/share/elasticsearch/dataenvironment:- node.name=es03- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es01,es02- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es03/es03.key- xpack.security.http.ssl.certificate=certs/es03/es03.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es03/es03.key- xpack.security.transport.ssl.certificate=certs/es03/es03.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1healthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120kibana:depends_on:es01:condition: service_healthyes02:condition: service_healthyes03:condition: service_healthyimage: docker.elastic.co/kibana/kibana:${STACK_VERSION}volumes:- certs:/usr/share/kibana/config/certs- kibanadata:/usr/share/kibana/dataports:- ${KIBANA_PORT}:5601environment:- SERVERNAME=kibana- ELASTICSEARCH_HOSTS=https://es01:9200- ELASTICSEARCH_USERNAME=kibana_system- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crtmem_limit: ${MEM_LIMIT}healthcheck:test:["CMD-SHELL","curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'",]interval: 10stimeout: 10sretries: 120volumes:certs:driver: localesdata01:driver: localesdata02:driver: localesdata03:driver: localkibanadata:driver: local

上面是官方的范例文件,是可以直接运行的是可以启动的

注意:

  1. 这里使用的都是数据卷,当需要迁移或者读取其中的文件,还需要绕着弯的解决,我还是比较喜欢直接挂载宿主机目录
  2. 现在的docker compose中 version 选项已经废弃了,再添加会报警告,所以可以直接去掉
  3. 还有网络,需要加上网络部分,我没深究,但是发现,现在的docker compose会使用项目这种东西来隔绝,类似K8s中的命名空间,所以,可能不太需要把所有容器都手动放在同一个网络中了
  4. kibana容器需要开启特权
  5. kibana还需要开启中文

下面是改进后的资源清单文件

services:setup:image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certsuser: "0"networks:- escommand: >bash -c 'if [ x${ELASTIC_PASSWORD} == x ]; thenecho "Set the ELASTIC_PASSWORD environment variable in the .env file";exit 1;elif [ x${KIBANA_PASSWORD} == x ]; thenecho "Set the KIBANA_PASSWORD environment variable in the .env file";exit 1;fi;if [ ! -f config/certs/ca.zip ]; thenecho "Creating CA";bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip;unzip config/certs/ca.zip -d config/certs;fi;if [ ! -f config/certs/certs.zip ]; thenecho "Creating certs";echo -ne \"instances:\n"\"  - name: es01\n"\"    dns:\n"\"      - es01\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\"  - name: es02\n"\"    dns:\n"\"      - es02\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\"  - name: es03\n"\"    dns:\n"\"      - es03\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\> config/certs/instances.yml;bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;unzip config/certs/certs.zip -d config/certs;fi;echo "Setting file permissions"chown -R root:root config/certs;find . -type d -exec chmod 750 \{\} \;;find . -type f -exec chmod 640 \{\} \;;echo "Waiting for Elasticsearch availability";until curl -s --cacert config/certs/ca/ca.crt https://es01:9200 | grep -q "missing authentication credentials"; do sleep 30; done;echo "Setting kibana_system password";until curl -s -X POST --cacert config/certs/ca/ca.crt -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" https://es01:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;echo "All done!";'healthcheck:test: ["CMD-SHELL", "[ -f config/certs/es01/es01.crt ]"]interval: 1stimeout: 5sretries: 120es01:depends_on:setup:condition: service_healthyimage: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certs- ./esdata01:/usr/share/elasticsearch/dataports:- ${ES_PORT}:9200environment:- node.name=es01- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es02,es03- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es01/es01.key- xpack.security.http.ssl.certificate=certs/es01/es01.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es01/es01.key- xpack.security.transport.ssl.certificate=certs/es01/es01.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1networks:- eshealthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120es02:depends_on:- es01image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certs- ./esdata02:/usr/share/elasticsearch/dataenvironment:- node.name=es02- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es01,es03- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es02/es02.key- xpack.security.http.ssl.certificate=certs/es02/es02.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es02/es02.key- xpack.security.transport.ssl.certificate=certs/es02/es02.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1networks:- eshealthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120es03:depends_on:- es02image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certs- ./esdata03:/usr/share/elasticsearch/dataenvironment:- node.name=es03- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es01,es02,es03- discovery.seed_hosts=es01,es02- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es03/es03.key- xpack.security.http.ssl.certificate=certs/es03/es03.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es03/es03.key- xpack.security.transport.ssl.certificate=certs/es03/es03.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1networks:- eshealthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120kibana:depends_on:es01:condition: service_healthyes02:condition: service_healthyes03:condition: service_healthyimage: docker.elastic.co/kibana/kibana:${STACK_VERSION}privileged: true  volumes:- ./certs:/usr/share/kibana/config/certs- ./kibanadata:/usr/share/kibana/dataports:- ${KIBANA_PORT}:5601environment:- SERVERNAME=kibana- ELASTICSEARCH_HOSTS=https://es01:9200- ELASTICSEARCH_USERNAME=kibana_system- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crt- I18N_LOCALE="zh-CN"mem_limit: ${MEM_LIMIT}networks:- eshealthcheck:test:["CMD-SHELL","curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'",]interval: 10stimeout: 10sretries: 120
networks:                                                                                                   es:                                                                                                       driver: bridge

简化版的docker-compose.yaml文件

当我们资源有限的时候,可以只起单个elasticsearch容器,或者资源很充足的时候,可以多添加几个elasticsearch容器

但是注意,尽量让elasticsearch集群的节点数量保持奇数个,具体原由就不在这里解释了。

services:setup:image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certsuser: "0"networks:- escommand: >bash -c 'if [ x${ELASTIC_PASSWORD} == x ]; thenecho "Set the ELASTIC_PASSWORD environment variable in the .env file";exit 1;elif [ x${KIBANA_PASSWORD} == x ]; thenecho "Set the KIBANA_PASSWORD environment variable in the .env file";exit 1;fi;if [ ! -f config/certs/ca.zip ]; thenecho "Creating CA";bin/elasticsearch-certutil ca --silent --pem -out config/certs/ca.zip;unzip config/certs/ca.zip -d config/certs;fi;if [ ! -f config/certs/certs.zip ]; thenecho "Creating certs";echo -ne \"instances:\n"\"  - name: es\n"\"    dns:\n"\"      - es\n"\"      - localhost\n"\"    ip:\n"\"      - 127.0.0.1\n"\> config/certs/instances.yml;bin/elasticsearch-certutil cert --silent --pem -out config/certs/certs.zip --in config/certs/instances.yml --ca-cert config/certs/ca/ca.crt --ca-key config/certs/ca/ca.key;unzip config/certs/certs.zip -d config/certs;fi;echo "Setting file permissions"chown -R root:root config/certs;find . -type d -exec chmod 750 \{\} \;;find . -type f -exec chmod 640 \{\} \;;echo "Waiting for Elasticsearch availability";until curl -s --cacert config/certs/ca/ca.crt https://es:9200 | grep -q "missing authentication credentials"; do sleep 30; done;echo "Setting kibana_system password";until curl -s -X POST --cacert config/certs/ca/ca.crt -u "elastic:${ELASTIC_PASSWORD}" -H "Content-Type: application/json" https://es:9200/_security/user/kibana_system/_password -d "{\"password\":\"${KIBANA_PASSWORD}\"}" | grep -q "^{}"; do sleep 10; done;echo "All done!";'healthcheck:test: ["CMD-SHELL", "[ -f config/certs/es/es.crt ]"]interval: 1stimeout: 5sretries: 120es:depends_on:setup:condition: service_healthyimage: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}volumes:- ./certs:/usr/share/elasticsearch/config/certs- ./esdata:/usr/share/elasticsearch/datanetworks:- esports:- ${ES_PORT}:9200environment:- node.name=es- cluster.name=${CLUSTER_NAME}- cluster.initial_master_nodes=es- ELASTIC_PASSWORD=${ELASTIC_PASSWORD}- bootstrap.memory_lock=true- xpack.security.enabled=true- xpack.security.http.ssl.enabled=true- xpack.security.http.ssl.key=certs/es/es.key- xpack.security.http.ssl.certificate=certs/es/es.crt- xpack.security.http.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.enabled=true- xpack.security.transport.ssl.key=certs/es/es.key- xpack.security.transport.ssl.certificate=certs/es/es.crt- xpack.security.transport.ssl.certificate_authorities=certs/ca/ca.crt- xpack.security.transport.ssl.verification_mode=certificate- xpack.license.self_generated.type=${LICENSE}mem_limit: ${MEM_LIMIT}ulimits:memlock:soft: -1hard: -1healthcheck:test:["CMD-SHELL","curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",]interval: 10stimeout: 10sretries: 120kibana:depends_on:es:condition: service_healthyimage: docker.elastic.co/kibana/kibana:${STACK_VERSION}privileged: truenetworks:- esvolumes:- ./certs:/usr/share/kibana/config/certs- ./kibanadata:/usr/share/kibana/dataports:- ${KIBANA_PORT}:5601environment:- SERVERNAME=kibana- ELASTICSEARCH_HOSTS=https://es:9200- ELASTICSEARCH_USERNAME=kibana_system- ELASTICSEARCH_PASSWORD=${KIBANA_PASSWORD}- ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES=config/certs/ca/ca.crt- I18N_LOCALE="zh-CN"mem_limit: ${MEM_LIMIT}healthcheck:test:["CMD-SHELL","curl -s -I http://localhost:5601 | grep -q 'HTTP/1.1 302 Found'",]interval: 10stimeout: 10sretries: 120
networks:                                                                                                   es:                                                                                                       driver: bridge

部署

如果是使用原示例资源清单文件部署

docker compose up -d

如果是使用被我修改过的资源清单文件部署,会稍微复杂点

第一次启动

第一次启动,不加-d,让在前台运行,用来生成证书文件和elasticsearch的三个容器的数据目录

docker compose up

等待报错停止

修改权限

chown -R 1000:1000 certs/
chown -R 1000:1000 certs/esdata0*

第二次启动

为了让三个 elasticsearch 容器正常部署,并且生成 kibana 的数据目录,所以,依然不加 -d

# 先down,然后再启动
docker compose down
docker compose up

看到 kibana 容器报错停止

第二次修改权限

先 ctrl+C 退出,然后修改目录权限

chown -R 1000:1000 kibanadata/

正式部署

这次可以直接添加 -d

# 先down,然后再启动
docker compose down
docker compose up -d

此时基本就可以正常部署了

然后,等待一会儿,就可以通过web浏览器来访问kibana,测试是否部署成功

http://<你的IP地址>:5601/

然后用户名是 elastic ,密码是我上面 .env 中设置的 KIBANA_PASSWORD 配置项,例如我上面设置的 111111

访问测试 elasticsearch

浏览器访问 https://<你的IP地址>:9200/ ,密码是我上面 .env 中设置的 ELASTIC_PASSWORD 配置项,例如我上面设置的 111111

然后,如果有类似这样的结果,就表明部署成功

{"name": "es01","cluster_name": "docker-cluster","cluster_uuid": "Y5JaQGImTLaVVATrwZI88w","version": {"number": "8.15.1","build_flavor": "default","build_type": "docker","build_hash": "253e8544a65ad44581194068936f2a5d57c2c051","build_date": "2024-09-02T22:04:47.310170297Z","build_snapshot": false,"lucene_version": "9.11.1","minimum_wire_compatibility_version": "7.17.0","minimum_index_compatibility_version": "7.0.0"},"tagline": "You Know, for Search"
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/794740.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【LLM训练系列】从零开始训练大模型之Phi2-mini-Chinese项目解读

一、前言 本文主要是在复现和实践Phi2-mini-Chinese后,简要分析下Phi2-mini-Chinese这个项目,做一个学习实战总结。 原文发布于知乎:https://zhuanlan.zhihu.com/p/718307193,转载请注明出数。 Phi2-mini-Chinese简介 Phi2-Chinese-0.2B 从0开始训练自己的Phi2中文小模型,…

第20篇 window系统安装Redis流程

1.下载 Redis for Windows Redis 官方并没有提供 Windows 版本的安装包,但你可以使用 Microsoft 维护的 Windows 版本的 Redis。你可以从以下链接下载 Redis for Windows:2.安装 Redis 运行安装程序: 双击下载的 .msi 文件,启动安装程序。 按照安装向导的提示进行安装。这里…

C++顺序结构(1)任务

1、下载并观看视频(照着做,多看几遍) https://www.jianguoyun.com/p/DWCNkNEQi8_wDBj5ptYFIAA 2、两项照着做的任务

xlam插件制作实验手册

大家来和笔者一起做一个xlam插件吧。很简单,很详细。 楔子excel支持自定义菜单栏,但是我在搜索如何制作菜单栏,以及如何制作addin文件的时候,即使是最好的例子,也只是点到为止,做了一个按钮就结束了。想要再进一步,竟然就没有合适的二手资料了。所以自然笔者就决定自己补…

极大似然估计的思想及计算[例题]

0 前言本文主要介绍极大似然估计的意义,并举出例题帮助读者理解。1 思想极大似然估计(Maximum Likelihood Estimation, MLE)是一种在统计学中估计模型参数的方法。它的基本思想是:找到一组参数值,使得在这组参数下,观测到的数据出现的概率(即似然函数)最大。假如有一个…

大模型的两个重要能力 (IF + FC)

MiniCPM https://github.com/OpenBMB/MiniCPM 面壁智能推出的大模型,在如下方面支持能出众。 推理 长文本 RAG 都是常见的能力。 其中 指令遵从(IF=instruction follow) 和 工具调用(FC = function call), 威力强大, 可以用作很多语音控制场景。MiniCPM 3.0MiniCPM 3.0 是一…

【工具推荐】todesk最新版设备代码、连接密码读取工具,附下载链接

工具介绍: todesk最新版读取设备代码、连接密码 工具 下载链接: 链接: https://pan.quark.cn/s/237b57f42911使用说明 工具使用效果如图看着就真的看着,不学就真的5

代码整洁之道--读书笔记(6)

代码整洁之道简介: 本书是编程大师“Bob 大叔”40余年编程生涯的心得体会的总结,讲解要成为真正专业的程序员需要具备什么样的态度,需要遵循什么样的原则,需要采取什么样的行动。作者以自己以及身边的同事走过的弯路、犯过的错误为例,意在为后来者引路,助其职业生涯迈上更…

东方符斗祭,一款类三国杀游戏

介绍 题外话不客气的说,当初三国杀的模仿者有一大堆,光是我买过的实体卡就有两种,一个叫做杜甫很忙,另一个是校园题材的,有一张锦囊是爸是x刚,效果记不太清了,估计是无懈可击。东方符斗祭官网 https://www.thbattle.net/github 这个地址其实没什么意义,因为使用了闭源插…

2024-9-9

file类简单学习

微信支付开发避坑指南

1 微信支付的坑 1.1 不能用前端传递过来的金额 订单的商品金额要从数据库获取,前端只传商品 id。 1.2 交易类型trade type字段不要传错 v2版API,不同交易类型,要调用的支付方式也不同。 1.3 二次签名 下单时,在拿到预支付交易会话标识时,要进行二次签名操作。二次签名后的…

[MySQL]一次死锁排查

字节面试题在可重复隔离级别下,这种情况会发生什么? 答案:死锁 下面我们用一个具体的例子来展示: 首先我们有一张这样的表下面我们来执行一些语句,可以看到结果输出了,检测到发生了死锁 Deadlock found when trying to get lock; try restarting transaction下面具体分析…