环境

  • Windows10企业版X64
  • JDK-1.8
  • ElasticSearch-5.0.0
  • node-v4.5.0-x64.msi
  • git客户端

步骤

安装node到D盘。如D:\nodejs。

把NODE_HOME设置到环境变量里(安装包也可以自动加入PATH环境变量)。测试一下node是否生效:

安装grunt

grunt是一个很方便的构建工具,可以进行打包压缩、测试、执行等等的工作,5.0里的head插件就是通过grunt启动的。因此需要安装grunt:

注意:路径切到D:\nodejs下。

npm install -g grunt-cli

-g代表全局安装。安装路径为C:\Users\yourname\AppData\Roaming\npm,并且自动加入PATH变量。安装完成后检查一下:

把head插件的源码git clone下来:

git clone git://github.com/mobz/elasticsearch-head.git

效果如图:

修改head源码

由于head的代码还是2.6版本的,直接执行有很多限制,比如无法跨机器访问。因此需要用户修改两个地方:

目录:head/Gruntfile.js:

connect: {
server: {
options: {
port: 9100,
hostname: '*',
base: '.',
keepalive: true
}
}
}

增加hostname属性,设置为*

修改连接地址:

目录:head/_site/app.js

修改head的连接地址:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";

把localhost修改成你es的服务器地址,如:

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";

运行head

修改elasticsearch的参数

修改一下es使用的参数。编辑config/elasticsearch.yml:

# 换个集群的名字,免得跟别人的集群混在一起
cluster.name: es-5.0-test # 换个节点名字
node.name: node- # 修改一下ES的监听地址,这样别的机器也可以访问
network.host: 0.0.0.0 # 默认的就好
http.port: # 增加新的参数,这样head插件可以访问es
http.cors.enabled: true
http.cors.allow-origin: "*"

注意,设置参数的时候:后面要有空格!

开启ES-5.0.0:

D:\ElasticSearch-5.0.\bin\elasticsearch.bat

启动效果:

然后在head源码目录中,执行npm install 下载的包:

 npm install

效果如图:

初次运行安装可能会报警告或错误。可以重新运行一次npm install。

最后,在head源代码目录下启动nodejs:

grunt server

效果如图:

访问:target:9100

这个时候,访问http://localhost:9100就可以访问head插件了:

因为之前已在ES中建立了一个索引m8,因此可以看到数据:

参考文章:http://blog.csdn.net/laoyang360/article/details/51472821

ElasticSearch-5.0安装head插件的更多相关文章

  1. windows 7 下elasticsearch5.0 安装head 插件

    windows 7 下elasticsearch5.0 安装head 插件 elasticsearch5.0 和2有了很大的变化,以前的很多插件都有了变化比如 bigdesk head,以下是安装he ...

  2. myeclipse6.0安装svn插件

    myeclipse6.0安装svn插件 转载地址:http://www.cnblogs.com/danica/archive/2011/07/12/2104323.html myeclipse6.0安 ...

  3. Elasticsearch 5.0 安装 Search Guard 5 插件 (五)

    一.Search Guard 简介 Search Guard  是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...

  4. ElasticSearch 5.0及head插件安装

    一.elasticsearch安装配置 1.官网下载源码包 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0 ...

  5. Elasticsearch 5.0 安装 Search Guard 5 插件

    一.Search Guard 简介 Search Guard  是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...

  6. (转) Elasticsearch 5.0 安装 Search Guard 5 插件

    一.Search Guard 简介 Search Guard  是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...

  7. Eclipse Indigo 3.7.0 安装GIT插件提示 requires 'bundle org.eclipse.team.core(转)

    文章参考来源:http://showlike.iteye.com/blog/1958538 错误提示: Cannot complete the install because one or more ...

  8. Eclipse Indigo 3.7.0 安装GIT插件提示 requires 'bundle org.eclipse.team.core(转)

    错误提示: Cannot complete the install because one or more required items could not be found.Software bei ...

  9. myeclipse9.0安装svn插件

    先得保证myeclipse9.0是可以正常使用的吧. 第一步当然是从网上下载SVN插件啦.myeclipse9.0集成的eclipse版本是属于3.x,所以下载eclipse3.x系列的SVN插件. ...

  10. Eclipse Indigo 3.7.0 安装GIT插件

    Eclipse上安装GIT插件EGit 首先打开Eclipse,然后点击Help>Install New Software>Add. Name:EGit Location: http:// ...

随机推荐

  1. winform(四)——简单计算器制作

    效果图: 代码区: using System; using System.Collections.Generic; using System.ComponentModel; using System. ...

  2. Python之路:堡垒机实例

    堡垒机前戏 开发堡垒机之前,先来学习Python的paramiko模块,该模块机遇SSH用于连接远程服务器并执行相关操作 SSHClient 用于连接远程服务器并执行基本命令 基于用户名密码连接: 1 ...

  3. YARN DistributedShell源码分析与修改

    YARN DistributedShell源码分析与修改 YARN版本:2.6.0 转载请注明出处:http://www.cnblogs.com/BYRans/ 1 概述 2 YARN Distrib ...

  4. 电信行业的BI应用

    截至2015年年底,我国三大运营商的移动用户数达到13.1亿户,4G /3G用户累计达到8.09亿户,再次创下新高.从三大运营商的年度财报来看,在具体业务方面,三大运营商的数据流量业务带来的收入均已超 ...

  5. import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包

    import com.sun.image.codec.jpeg.JPEGCodec;   在Eclipse中处理图片,需要引入两个包: import com.sun.image.codec.jpeg. ...

  6. matlab里的svmtrain的输出model里,各参数的含义

    Parameters: [5x1 double]  %结构体变量,依次保存的是 -s -t -d -g -r等参数      nr_class: 4    %分类的个数          totalS ...

  7. HTML总结

    几个知识点: HTML 指的是超文本标记语言 (Hyper Text Markup Language) HTML框架结构: <!DOCTYPE html> <html> < ...

  8. java 异常

    1.java异常 2.自定义抛出 3.运行时异常,程序有问题,让使用者可以改' ' 4.return  和  throw的区别 return 符合函数要求的值    throw  有问题的时候用它结束 ...

  9. return false

    ”return false“到底做了什么? 当你每次调用”return false“的时候,它实际上做了3件事情: •event.preventDefault();•event.stopPropaga ...

  10. C#.NET 大型通用信息化系统集成快速开发平台 4.1 版本 - 密码强化、网络安全强化

    公司的系统庞大后,用户数量也庞大,容易引起各种网络安全相关问题,需要把每个用户的网络安全意识都提高,由于历史原因有些用户的密码过于简单,很容易被猜到,引起很多没必要的麻烦. 系统登录成功后,检查密码复 ...