Windows 下ElasticSearch和ElasticSearch Head安装教程
安装JDK,版本JDK8以上
从官网下载es,选择WINDOWS版本,下载地址:https://www.elastic.co/cn/downloads/elasticsearch
解压到本地文件夹,进入安装目录下的config目录,修改elasticsearch.yml文件.在文件的末尾加入以下代码
http.cors.enabled: true http.cors.allow-origin: "*" node.master: true node.data: true
到bin目录下,执行elasticsearch.bat启动ES
浏览器访问 http://localhost:9200/ ,返回es的相关信息
安装node环境,安装好后,执行 npm install -g grunt-cli 安装grunt ,安装完成后执行grunt -version查看是否安装成功,会显示安装的版本号
下载 ElasticSearch Head ,下载地址:https://github.com/NavyShu/Elasticsearch-Head
解压后打开Gruntfile.js,在此位置加上hostname
connect: { server: { options: { hostname:"*", port: 9100, base: '.', keepalive: true } } }
在head目录下执行npm install 安装完成后执行grunt server 或者npm run start 运行head插件,如果不成功重新安装grunt