Mac 安装ElasticSearch和Kibana详细教程

1、安装elasticsearc

1.1、下载地址:Download Elasticsearch | Elastic

**1.2、**开始安装,解压压缩包,进入elasticsearch-9.0.2/bin,找到elsticsearch,双击安装

**1.3、**安装完成

**1.4、**浏览器中查看
https://localhost:9200/

**1.5、**用户名密码
Elasticsearch 在启用 X-Pack 安全特性时,初始默认用户名是 elastic ,默认密码在安装 X-Pack 并启动 Elasticsearch 之后,可以通过运行 elasticsearch-setup-passwords 命令来修改。
用户名密码获取,查看安装完成控制台中,如下图:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ✅ Elasticsearch security features have been automatically configured! ✅ Authentication is enabled and cluster connections are encrypted. ℹ️ Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`): g3Y*5I4eKZtDfW6kC1aQ ℹ️ HTTP CA certificate SHA-256 fingerprint: 4a37ae708f18e9d176f92fff78400cf5b1f40fb98b7e63ae200d38d66948f852 ℹ️ Configure Kibana to use this cluster: • Run Kibana and click the configuration link in the terminal when Kibana starts. • Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes): eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTkyLjE2OC4yMDYuMTM4OjkyMDAiXSwiZmdyIjoiNGEzN2FlNzA4ZjE4ZTlkMTc2ZjkyZmZmNzg0MDBjZjViMWY0MGZiOThiN2U2M2FlMjAwZDM4ZDY2OTQ4Zjg1MiIsImtleSI6Iko0TzhlNWNCQ1pHTzE0R29pWnJ2OmZNMDZaZFhfTHE4TXJtdjJqck1UdUEifQ== ℹ️ Configure other nodes to join this cluster: • On this node: ⁃ Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`. ⁃ Uncomment the transport.host setting at the end of config/elasticsearch.yml. ⁃ Restart Elasticsearch. • On other nodes: ⁃ Start Elasticsearch with `bin/elasticsearch --enrollment-token <token>`, using the enrollment token that you generated.

**1.6、**输入用户名密码后进入,如下图:

1.7、执行elasticsearch-setup-passwords

**1.8、**新开一个终端,执行命令:
重置 elastic用户的密码:例如 elasticsearch-setup-passwords elastic
./elasticsearch-reset-password -a -u elastic This tool will reset the password of the [elastic] user to an autogenerated value. The password will be printed in the console. Please confirm that you would like to continue [y/N]y Password for the [elastic] user successfully reset. New value: aBq2tOp_scT-crZnaKJa
重置 kibana_system 用户的密码,这个密码在后面会用到,保存起来。
./elasticsearch-reset-password -a -u kibana_system This tool will reset the password of the [kibana_system] user to an autogenerated value. The password will be printed in the console. Please confirm that you would like to continue [y/N]y Password for the [kibana_system] user successfully reset. New value: 8q28ewHYuX=UnqjaYllR
当然,你也可以使用elasticsearch-setup-passwords interactive为每个es保留用户设置密码

2、安装Kibana

  1. 首先确保电脑已经安装 node.js
  2. 如果不确认电脑是否安装node.js,前往终端输入 node**-v或者node --version查看node版本**
    node -v node --version

    2.1、在官网上下载kibana
    下载地址: Download Kibana Free | Get Started Now | Elastic

    2.2、开始安装 kibana,进入**/kibana-9.0.2/bin,执行kibana**

    提示从互联网下载,选择允许,开始下载和安装
安装完成后如图
浏览器中查看:http://localhost:5601/?code=789199

如下图中操作,点击设置elasticsearch地址。

配置启动地址

下一步,使用kibana_system 用户,和上面生成的密码,登录;

这里先点击,自己操作

登录成功

相关推荐
@@神农11 小时前
maven的概述以及在mac安装配置
java·macos·maven
山河亦问安12 小时前
基于Kafka+ElasticSearch+MongoDB+Redis+XXL-Job日志分析系统(学习)
mongodb·elasticsearch·kafka
恒雨田12 小时前
解决 jenkins 用户 SSH 连接目标服务器时的 Permission denied 问题
运维·ssh·jenkins
不老刘12 小时前
macOS/Linux ClaudeCode 安装指南及 Claude Sonnet 4.5 介绍
linux·macos·ai编程·claude·vibecoding
Lin_Aries_042119 小时前
基于 CI/CD(Jenkins)将 Spring Boot 应用自动部署到 Kubernetes 集群
spring boot·ci/cd·docker·容器·自动化·jenkins
Elasticsearch19 小时前
Elasticsearch MCP 服务器:与你的 Index 聊天
elasticsearch
醉、倾城20 小时前
面向开发人员的macOS入门教程
macos·策略模式
vv_5011 天前
Langchain+Neo4j+Agent 的结合案例-电商销售
人工智能·langchain·agent·neo4j
tpoog1 天前
[C++项目组件]Elasticsearch简单介绍
开发语言·c++·elasticsearch
脚踏实地的大梦想家1 天前
【LangChain】P4 LangChain 多轮对话与上下文记忆深度解析
langchain