一、ES的安装

1、到ES官网下载ES

安装ES前,需要安装JDK1.8以上版本

https://www.elastic.co/downloads/elasticsearch

ES WIndows 安装 ES与ES-head

2、解压ES

ES WIndows 安装 ES与ES-head

3、安装ES

打开bin目录下elasticsearch.bat 

ES WIndows 安装 ES与ES-head

4、验证

进入 http://localhost:9200 出现如下页面代表成功

ES WIndows 安装 ES与ES-head

 

二、安装Node.js

1、下载Node.js

https://nodejs.org/en/download/

ES WIndows 安装 ES与ES-head

2、安装Node.js

一直确定,安装后验证

ES WIndows 安装 ES与ES-head

 三、安装grunt

运行head需要借助grunt命令,因此需要安装grunt,Windows+R,输入cmd

1、找到node.js目录

ES WIndows 安装 ES与ES-head

2、执行安装grunt命令

npm install -g grunt -cli

ES WIndows 安装 ES与ES-head

 

四、安装Head插件

1、下载地址

https://github.com/mobz/elasticsearch-head

ES WIndows 安装 ES与ES-head

2、解压ES-Head

ES WIndows 安装 ES与ES-head

3、安装ES-Head

进入head目录下安装pathomjs

输入命令 cd D:\es-head(你安装head的路径) 进入head的根目录下,然后执行命令:npm install 进行安装pathomjs(安装时间较长)

ES WIndows 安装 ES与ES-head

最后

ES WIndows 安装 ES与ES-head

4、启动Head插件

 最后,在刚刚的命令窗口执行运行命令 grunt server,启动head服务,如下所示则为启动成功。(可以到head根目录下修改Gruntfile.js文件的启动端口,默认是9100)

ES WIndows 安装 ES与ES-head

5、修改es配置文件

elasticsearch安装目录/config/elasticsearch.yml,打开文件后在末端另起一行分别顶格添加如下两行红色字体文本,保存后重启elasticsearch.bat

http.cors.enabled: true
http.cors.allow-origin: "*"

ES WIndows 安装 ES与ES-head

6、用head访问elasticsearch

 浏览器访问 http://localhost:9100 (head的服务端口)

ES WIndows 安装 ES与ES-head

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-01-01
  • 2021-04-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-12-30
  • 2021-07-26
  • 2022-12-23
相关资源
相似解决方案