当前位置: 首页 > news >正文

【ES】elasticsearch8.3.3

这里仅实践操作并根据实际问题进行记录笔记。

运行 ES8

我们需要在自己的电脑上安装好 Docker Desktop。接着我们运行如下的命令:出现两个异常,一个是需要使用winpty因为我使用win的docker desktop,另外一个问题是docker启动elasticsearchERROR: Elasticsearch did not exit normally - check the logs at xxx。解决办法:在运行命令中添加 -e "discovery.type=single-node"。最终运行命令

$ docker network create elastic
$ docker pull docker.elastic.co/elasticsearch/elasticsearch:8.3.3
winpty docker run  -e ES_JAVA_OPTS="-Xms1024m -Xmx1024m" -e "discovery.type=single-node" --name es-node01 --net elastic -p 9200:9200 -p 9300:9300 -it docker.elastic.co/elasticsearch/elasticsearch:8.3.3$ docker logs es-node01 -f --tail 1000$ docker pull docker.elastic.co/kibana/kibana:8.3.3
$ winpty docker run --name kib-01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:8.3.3

最后显示图,如下:
在这里插入图片描述

验证访问

$ docker cp es-node01:/usr/share/elasticsearch/config/certs/http_ca.crt .
$ curl -X GET --cacert ./http_ca.crt -u elastic:8-u-CiRMc1FgM8k*fNRY https://localhost:9200/{"name" : "80785c9c7f2e","cluster_name" : "docker-cluster","cluster_uuid" : "yfxAwhuwSdiAXYgrXSfp-Q","version" : {"number" : "8.3.3","build_flavor" : "default","build_type" : "docker","build_hash" : "801fed82df74dbe537f89b71b098ccaff88d2c56","build_date" : "2022-07-23T19:30:09.227964828Z","build_snapshot" : false,"lucene_version" : "9.2.0","minimum_wire_compatibility_version" : "7.17.0","minimum_index_compatibility_version" : "7.0.0"},"tagline" : "You Know, for Search"
}

安装 IK

sh-5.0$ cd /usr/share/elasticsearch/
sh-5.0$ ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.3.3/elasticsearch-analysis-ik-8.3.3.zip^C
sh-5.0$ pwd
/usr/share/elasticsearch
sh-5.0$ ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.3.3/elasticsearch-analysis-ik-8.3.3.zip
-> Installing https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.3.3/elasticsearch-analysis-ik-8.3.3.zip
-> Downloading https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v8.3.3/elasticsearch-analysis-ik-8.3.3.zip
[=================================================] 100%??
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.net.SocketPermission * connect,resolve
See https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.Continue with installation? [y/N]y
-> Installed analysis-ik
-> Please restart Elasticsearch to activate any plugins installedsh-5.0$ ./bin/elasticsearch-plugin list
analysis-ik上面的命令显示我们的 IK 已经安装成功了。
这个时候需要我们重新启动一下我们的 Elasticsearch,以便这个 plugin 能装被加载。

验证访问

安装后没有重启
在这里插入图片描述
正确应该是
在这里插入图片描述

安装 KIB

验证访问

访问地址:http://localhost:5601
访问账号:elastic
访问密码:8-u-CiRMc1FgM8k*fNRY
首次验证:569 587 (KIB后台打印)
首次token:eyJ2ZXIiOiI4LjMuMyIsImFkciI6WyIxNzIuMjMuMC4yOjkyMDAiXSwiZmdyIjoiMGU3MDAzMmVlMjMxMzAyODA5ZWQ1MTg2YjI2ZjA1ZmEyODE5NzkwMTdiZjg4NGY3Nzc2NzIzZTBlNWM0MmEyNSIsImtleSI6IkF1QnZSWW9CTWRwSnl4VVZQYmowOjRPUG9lMlI0UjNlWXFLZGtmRHUyNlEifQ==
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

辅助参考

Elastic:开发者上手指南
Elasticsearch:使用 Docker compose 来一键部署 Elastic Stack 8.x
ElasticSearch
IK Analysis for Elasticsearch
elasticsearch-analysis-ik

http://www.lryc.cn/news/155319.html

相关文章:

  • 2023年下半年广州/深圳软考(中/高级)认证报名,当然弘博创新
  • 2017. 网格游戏;2397. 被列覆盖的最多行数;2202. K 次操作后最大化顶端元素
  • 专访远航汽车远勤山:踏踏实实做好产品 直面挑战乘风远航
  • Redis基本了解
  • Seata处理分布式事务之1.7.0
  • 在k8s中用label控制Pod部署到指定的node上
  • vue3 搭配ElementPlus做基础表单校验 自定义表单校验
  • Vue项目中处理key=value格式的数据-案例
  • 如何截取视频中的一段视频?分享几种视频分割方法
  • 《Go 语言第一课》课程学习笔记(十四)
  • windows下配置pcl-python
  • CNN详细讲解
  • pdf怎么编辑文字?了解一下这几种编辑方法
  • MASM32编程状态栏显示字符动画,按钮跑马灯
  • Pytorch-以数字识别更好地入门深度学习
  • 微服务--服务介绍
  • 自定义线程池-初识
  • 低代码平台:IVX 重新定义编程
  • Android之自定义时间选择弹框
  • 异地容灾系统和数据仓库系统设计和体系结构
  • 【pytest】tep环境变量、fixtures、用例三者之间的关系
  • 风控引擎如何快速添加模型,并实时了解运行状态?
  • 一文读懂|内核顺序锁
  • openproject在docker下的安装
  • React【React是什么?、创建项目 、React组件化、 JSX语法、条件渲染、列表渲染、事件处理】(一)
  • Ubuntu系统下配置 Qt Creator 输入中文、配置软件源的服务器地址、修改Ubuntu系统时间
  • Ab3d.PowerToys 11.0.8614 Crack
  • 汽车3D HMI图形引擎选型指南【2023】
  • Stable Diffusion stable-diffusion-webui开发笔记
  • 利用MQ实现mysql与elasticsearch数据同步