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 用户,和上面生成的密码,登录;

这里先点击,自己操作

登录成功

相关推荐
找不到、了19 分钟前
Mysql使用Canal服务同步数据->ElasticSearch
数据库·mysql·elasticsearch
归辞...26 分钟前
「iOS」————SideTable
macos·ios·cocoa
Adorable老犀牛36 分钟前
Exporters | 安装elasticsearch_exporter
elasticsearch·prometheus·exporter
你好龙卷风!!!1 小时前
mac 安装pytho3 和pipx
macos
最幸伏的人2 小时前
Mac电脑安装HomeBrew
macos·homebrew
干了这杯柠檬多3 小时前
使用maven-shade-plugin解决es跨版本冲突
java·elasticsearch·maven
王国强20095 小时前
LangChain 设计原理分析⁷ | Agent 架构设计详解:决策循环与 ReAct
langchain
光头才能变强7 小时前
Mac安装WebStorm 2025版本
macos
阳光明媚sunny7 小时前
Mac电脑基本功能快捷键
macos·电脑