win下ElasticSearch与ES-head安装和使用
ElasticSearch的安装
第一步:下载ES
链接:https://www.elastic.co/cn/downloads/
第二步:解压ES压缩文件
第三步:进入到解压的文件的bin,打开cmd输入elasticsearch
这就是已经打开了elasticsearch的程序
第四步:浏览器打开
说明已经打开成功。
ES插件head的安装使用
下载链接:https://github.com/mobz/elasticsearch-head
安装node.js与cnpm
npm install ‐g cnpm ‐‐registry=https://registry.npm.taobao.org
cnpm和npm那个快用哪个。
安装好上述步骤后在head的目录下执行命令
npm install ‐g grunt‐cli
执行命令npm install
打开head
在浏览器下输入127.0.0.1:9100
即可访问成功
连接elasticsearch
发现出现跨域问题
在ES的解压目录下config目录中找到elasticsearch.yml配置文件,添加两条配置,并重启es程序,再次链接即可成功
http.cors.enabled: true
http.cors.allow-origin: “*”