elasticsearch下载与安装
一.下载elasticsearch文件
官网下载地址:https://www.elastic.co/downloads/elasticsearch
其他网址:
ElasticSearch: https://mirrors.huaweicloud.com/elasticsearch/?C=N&O=D
logstash: https://mirrors.huaweicloud.com/logstash/?C=N&O=D
kibana: https://mirrors.huaweicloud.com/kibana/?C=N&O=D
二.安装elasticsearch
1.解压文件
2.目录
bin 启动文件
config 配置文件
log4j2 日志配置文件
elasticsearch.yml配置文件 默认接口9200
3.调整jvn.options文件
如果电脑内存够用不需要更改
将22 23行的配置调整成为256m
jvn.options位置
更改内容
三.启动elasticsearch
双击bin下的elasticsearch.bat文件启动elasticsearch
启动中
启动完成,可看到接口号
打开浏览器将该接口复制,当得到以下结果时证明安装成功
http://127.0.0.1:9200
安装可视化插件 es head
下载地址
http://github.com/mobz/elasticsearch-head/
安装
解压完后用cmd打开文件所在目录 输入cnpm install
安装成功
输入npm run start启动 显示接口为9100 但在浏览器上仍然无法访问到,涉及到跨域问题
在浏览器上访问
http://localhost:9100/
链接9200 仍然不通(此图为改完跨域问题的)
打开elasticsearch\config中的elasticsearch.yml文件
在最后加入
http.cors.enabled: true
http.cors.allow-origin: “*”
即可解决跨域问题
重新启动elasticsearch
在浏览器上重新访问