elasticsearch 包 kibana 包 地址,华为仓库有 自行百度
安装elasticsearch 6.2.2 与中文分词
- wget + elasticsearch-6.2.2地址tar -zvxf elasticsearch包名进入bin下 安装 中文分词 `wget https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.2.2/elasticsearch-analysis-ik-6.2.2.zip
- tar -zvxf` 中文分词包名
- 改名为 `mv elasticsearch-analysis-ik-6.2.2.zip analysis-ik
挂后台 运行
./elasticsearch -d`- node.name: node-1
###网络监听地址
network.host: 192.168.1.39
http.port: 9200
http.host: 192.168.1.39
###使用head等插件监控集群信息,需要打开以下配置项
http.cors.enabled: true
http.cors.allow-origin: “*”
http.cors.allow-credentials: true
需要修改搜索引擎日志地址 就配置一下日志地址 最好是配一下
#Path to directory where to store the data (separate multiple locations by comma):
path.data: /var/log/elasticsearch
#Path to log files
path.logs: /var/data/elasticsearch
安装kibana
wget + kibana-6.2.2地址
tar -zvxf kibana
包名- 进入 config 修改 kibana.yml
vim kibana.yml
- 修改配置
- server.port: 5601 访问端口号
- server.host: “服务器IP” 切记不可填127.0.0.1 是填服务器对外的ip
- elasticsearch.url: “http://192.168.1.39:9200”
- bin目录下,kibana后台启动
nohup ./kibana > /dev/null 2>&1 &
- 关闭:查找psps -aux | grep node
SpringBoot项目出现None of the configured nodes are available: [{#transport#-1}{wX_VhkNYRKabdOp。。。。 连接报错 是因为spring-boot-starter-data-elasticsearch的版本与elasticsearch 版本不兼容,springBoot版本 改为2.1.6以上
Spring Boot 项目连接,pom添加以下
<!--Elasticsearch相关依赖-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-elasticsearch
</artifactId>
</dependency>