ElasticSearch-5.0安装head插件
环境
- 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插件的更多相关文章
- windows 7 下elasticsearch5.0 安装head 插件
windows 7 下elasticsearch5.0 安装head 插件 elasticsearch5.0 和2有了很大的变化,以前的很多插件都有了变化比如 bigdesk head,以下是安装he ...
- myeclipse6.0安装svn插件
myeclipse6.0安装svn插件 转载地址:http://www.cnblogs.com/danica/archive/2011/07/12/2104323.html myeclipse6.0安 ...
- Elasticsearch 5.0 安装 Search Guard 5 插件 (五)
一.Search Guard 简介 Search Guard 是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...
- ElasticSearch 5.0及head插件安装
一.elasticsearch安装配置 1.官网下载源码包 https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.0 ...
- Elasticsearch 5.0 安装 Search Guard 5 插件
一.Search Guard 简介 Search Guard 是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...
- (转) Elasticsearch 5.0 安装 Search Guard 5 插件
一.Search Guard 简介 Search Guard 是 Elasticsearch 的安全插件.它为后端系统(如LDAP或Kerberos)提供身份验证和授权,并向Elasticsearc ...
- 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 ...
- 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 ...
- myeclipse9.0安装svn插件
先得保证myeclipse9.0是可以正常使用的吧. 第一步当然是从网上下载SVN插件啦.myeclipse9.0集成的eclipse版本是属于3.x,所以下载eclipse3.x系列的SVN插件. ...
- Eclipse Indigo 3.7.0 安装GIT插件
Eclipse上安装GIT插件EGit 首先打开Eclipse,然后点击Help>Install New Software>Add. Name:EGit Location: http:// ...
随机推荐
- SQL SERVER 2000通过链接服务器发送邮件出现错误
案例环境: 服务器A系统: Windows Server 2000 数据库版本 : Microsoft SQL Server 2000 - 8.00.2282 (Intel X86) 服务器B系统: ...
- sp_configure错误:不支持对系统目录进行即席更新。
今天在一台数据库服务器上(Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64) Standard Edition (64-bit))使 ...
- SQL SERVER出现大量一致性错误的解决方法
如果DBCC CHECKDB发现了比较少的一致性错误,可以使用 DBCC UPDATEUSAGE(DatabaseName,"dbo.ObjectName"); 语句逐个针对表 ...
- redis 集群配置实战
文章转载自:http://hot66hot.iteye.com/blog/2050676 最近研究Redis-cluster,正好搭建了一个环境,遇到了很多坑,系统的总结下,等到redis3 rele ...
- Xcode 6、7 打包
从 Xcode 6 开始,打包需要开发者帐号添加到授权帐号列表里. 现实情况是作为公司开发工作者,很少能获此殊荣. 解决之道: 用 Xcode 6/7 照常打包,生成 *.xcarchive 文件,然 ...
- transactionManager的type与dataSource的type
1. 在ibatis的配置文件中dataSource 节点有这么个配置<datasource type="SIMPLE"></datasource>,根据原 ...
- POJ1190生日蛋糕[DFS 剪枝]
生日蛋糕 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18236 Accepted: 6497 Description ...
- 第三章Struts2 Action中动态方法调用、通配符的使用
01.Struts 2基本结构 使用Struts2框架实现用登录的功能,使用struts2标签和ognl表达式简化了试图的开发,并且利用struts2提供的特性对输入的数据进行验证,以及访问Servl ...
- JS中变量名和函数名重名
今天骚凯问了一道变量名冲突的题目,感觉很有意思,顺便也复习一下预解析的一些知识,有不对的地方忘前辈大神指正,题目是这样的: var a=100; function a(){ console.log(a ...
- java构造方法的作用以及简单java类
public class TestDemo{ public static void main(String args[]){ Emp emp1 =new Emp(001,"tom" ...