elasticsearch8.0和kibana8.0安装

前言
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页面,登录成功。
在这里插入图片描述

  • 6
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
安装ElasticsearchKibana,你可以按照以下步骤进行操作: 1. 首先,确保你的系统满足以下要求: - Java 11或更高版本已安装 - 内存至少为2GB 2. 前往Elasticsearch官方网站的下载页面(https://www.elastic.co/downloads/elasticsearch)选择适合你系统的版本。下载完成后,解压缩文件到你想要安装的目录。 3. 打开Elasticsearch的配置文件(位于解压缩目录中的config目录下),根据你的需要进行配置。一般来说,你可以使用默认配置启动Elasticsearch。 4. 执行以下命令启动Elasticsearch: ``` ./bin/elasticsearch ``` 5. 等待一段时间,直到Elasticsearch成功启动。你可以通过访问http://localhost:9200来验证是否成功。 6. 接下来,安装Kibana。前往Kibana官方网站的下载页面(https://www.elastic.co/downloads/kibana),选择适合你系统的版本。下载完成后,解压缩文件到你想要安装的目录。 7. 打开Kibana的配置文件(位于解压缩目录中的config目录下),根据你的需要进行配置。确保将"elasticsearch.hosts"设置为"http://localhost:9200",以便Kibana可以连接到Elasticsearch。 8. 执行以下命令启动Kibana: ``` ./bin/kibana ``` 9. 等待一段时间,直到Kibana成功启动。你可以通过访问http://localhost:5601来打开Kibana的Web界面。 现在,你已经成功安装ElasticsearchKibana。你可以使用Kibana来管理和可视化Elasticsearch中的数据。请注意,这只是基本的安装过程,你还可以根据你的需求进行更多的配置和定制。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值