栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

elasticsearch8.0和kibana8.0安装

elasticsearch8.0和kibana8.0安装

elasticsearch8.0安装

1.安装2.启动elasticsearch生成令牌kibana验证登录elasticsearch

前言
8.0中新功能使用8.0版本的最好先看下。

1.安装
docker pull elasticsearch:8.0.0
docker pull kibana:8.0.0
2.启动

启动elasticsearch、kibana
可以参考另一篇博客[docker安装kibana]、docker安装elasticSearch和head插件(https://blog.csdn.net/IT_road_qxc/article/details/121856640)
安装完毕后,挂载外部卷启动。
我这里已经安装并配置过了,直接启动容器。

docker start elasticsearch8
docker start kibana8

查看kibana是否启动成功。
访问 ip:5601

elasticsearch生成令牌

进入elasticsearch容器中生成令牌

# 进入容器
docker exec -it elasticsearch8 /bin/bash
# 生成令牌 令牌由30分钟有效期
bin/elasticsearch-create-enrollment-token --scope kibana

kibana验证
# 进入kibana容器中
docker exec -it kibana8 /bin/bash
# 执行生成验证码命令
bin/kibana-verification-code 
# 获得的验证码输入之前页面中
Your verification code is:  341 246


输入生成验证码点击验证


到这步算是elasticsearch和kiban8.0自动配置用户名密码验证完成。心细的小伙伴肯定发现kibana.yml与之前的不一样了。

登录elasticsearch

文档中介绍:

If you need to reset the password for the elastic user or other built-in users, run the elasticsearch-reset-password tool. This tool is available in the Elasticsearch /bin directory of the Docker container.
既然知道了咋做了,直接执行即可。

# 进入elastic容器中
docker exec -it elasticsearch8 /bin/bash
# 重置密码
bin/elasticsearch-reset-password --username elastic -i

运行结果:

elasticsearch@ca58f3f716bf:~$ bin/elasticsearch-reset-password -u elastic -i
This tool will reset the password of the [elastic] user.
You will be prompted to enter the password.
Please confirm that you would like to continue [y/N]y
Enter password for [elastic]: 
Re-enter password for [elastic]: 
Password for the [elastic] user successfully reset.

再次登录kibana页面,登录成功。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/744975.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号