Elasticsearch 和 Kibana 安装
Elasticsearch 和 Kibana 安装
- 操作系统:Windows 10
- Elastic Stack 版本:8.4.3
安装 Elasticsearch
下载 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.3-windows-x86_64.zip
运行 Elasticsearch:
cd elasticsearch-8.4.3 bin\elasticsearch.bat
第一次启动会生成以下安全配置:
- 超级用户
elastic
以及密码 - 用于加密传输和 HTTP 的密钥和证书
- 用于 Kibana 连接 Elasticsearch 的,有效期为 30 分钟的 token
- 将 TSL 配置信息写到配置文件
config\elasticsearch.yml
The generated password for the elastic built-in superuser is: <password> The enrollment token for Kibana instances, valid for the next 30 minutes: <enrollment-token> The hex-encoded SHA-256 fingerprint of the generated HTTPS CA DER-encoded certificate: <fingerprint> You can complete the following actions at any time: Reset the password of the elastic built-in superuser with 'bin\elasticsearch-reset-password -u elastic'. Generate an enrollment token for Kibana instances with 'bin\elasticsearch-create-enrollment-token -s kibana'. Generate an enrollment token for Elasticsearch nodes with 'bin\elasticsearch-create-enrollment-token -s node'.
确认启动成功:
curl --ssl-no-revoke --cacert config\certs\http_ca.crt -u elastic https://localhost:9200
客户端连接 Elasticsearch
第一次启动 Elasticsearch 会生成加密 HTTP 的 CA 证书:
config/certs/http_ca.crt
同时会在控制台打印证书的 SHA-256 指纹
客户端需要使用指纹或 CA 证书来和 Elasticsearch 建立 HTTPS 连接
可以通过 Git Bash 来获取证书指纹:
openssl x509 -fingerprint -sha256 -in config/certs/http_ca.crt
不支持指纹的客户端可以使用证书:
config\certs\http_ca.crt
安装 Kibana
下载 https://artifacts.elastic.co/downloads/kibana/kibana-8.4.3-windows-x86_64.zip
运行 Kibana:
cd kibana-8.4.3 bin\kibana.bat
点击控制台打印的连接:
i Kibana has not been configured. Go to http://localhost:5601/?code=755303 to get started.
输入 Elasticsearch 生成的 token
输入用户 elastic
以及 Elasticsearch 生成的密码
重置 token 和 密码:
# 重置 token bin\elasticsearch-create-enrollment-token -s kibana # 重置密码 bin\elasticsearch-reset-password -u elastic
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具