1、下载并配置nodejs
cd /usr/local/src/
wget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-x64.tar.xz && xz -d node-v6.9.5-linux-x64.tar.xz
tar -xvf node-v6.9.5-linux-x64.tar -C /usr/local/
ln -s /usr/local/node-v6.9.5-linux-x64/bin/node /usr/bin/node
ln -s /usr/local/node-v6.9.5-linux-x64/bin/npm /usr/bin/npm
node -v && npm -v

2、安装head插件
npm install -g grunt-cli
ln -s /usr/local/node-v6.9.5-linux-x64/lib/node_modules/grunt-cli/bin/grunt /usr/bin/grunt

3、下载并配置head
cd /var/lib/elasticsearch
git clone git://github.com/mobz/elasticsearch-head.git
chown -R elasticsearch:elasticsearch elasticsearch-head/
配置elasticsearch允许head插件跨域访问es:

http.cors.enabled: true
http.cors.allow-origin: "*"
4、安装head
cd /var/lib/elasticsearch/elasticsearch-head/
npm install
#安装完成后可能有一些报错,不影响使用,报错原因未知,本人对nodejs不了解,github上有相近的问题,但并未解决。解决方法如下:
(1) 查看报错信息”Error: Cannot find module '/var/lib/elasticsearch/elasticsearch-head/node_modules/phantomjs-prebuilt/install.js'”,未找到” phantomjs-prebuilt/install.js”文件;
(2) 采取比较土的办法,将完整的”phantomjs-prebuilt/”目录上传到相应位置,重新执行”npm install”,无报错。

由于无法上传附件,附上下载git地址:git clone https://github.com/ariya/phantomjs.git

5、配置head文件
/var/lib/elasticsearch/elasticsearch-head/_site/app.js

/var/lib/elasticsearch/elasticsearch-head/Gruntfile.js

6、启动服务
#启动head插件,需要到head目录下
#可以采用screen放在后台运行,不然退出ssh后grunt进程就关闭了。
grunt server &

7、服务访问:
http://171.16.45.243:9100/

elasticsearch5.3安装插件head的更多相关文章

  1. elasticsearch5.0.0 安装插件及配置过程

    elasticsearch5.0.0 安装插件及配置过程 由于es5.0是里程碑式的更新,所以很多变化的地方,暂时我就插件安装遇到的问题记录一下. 插件安装命令 2.3版本的安装命令 安装Marvel ...

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

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

  3. Elastic Stack 笔记(二)Elasticsearch5.6 安装 IK 分词器和 Head 插件

    博客地址:http://www.moonxy.com 一.前言 Elasticsearch 作为开源搜索引擎服务器,其核心功能在于索引和搜索数据.索引是把文档写入 Elasticsearch 的过程, ...

  4. ElasticSearch5.3安装head插件及连接ElasticSearch

    1. 安装插件head # 去github上下载head git clone git://github.com/mobz/elasticsearch-head.git # 由于head基于nodejs ...

  5. ElasticSearch5.5.1插件分类

    ElasticSearch5.5.1插件分类 附官网介绍:https://www.elastic.co/guide/en/elasticsearch/plugins/5.5/intro.html 一. ...

  6. elasticsearch5.5安装

    beat --------  kafka -------- logstash---------------elasticsearch--------------kibana beat配置文件 [roo ...

  7. ElasticSearch5.3安装IK分词器并验证

    ElasticSearch5.3安装IK分词器 之前使用Elasticsearch安装head插件成功了,但是安装IK分词器却失败了.貌似是ElasticSearch5.0以后就不支持直接在elast ...

  8. elasticsearch5.4安装

    1.从官网下载ES 安装包: elasticsearch-.tar.gz 2.解压到要安装的目录 注意:一定要切换用户,不能用root用户解压,不能用root用户启动 tar -zxvf elasti ...

  9. sublime 安装插件GitGutter报错,git binary cannot be found等等

    今天给sublime text安装插件GitGutter的时候,居然报错了,网上查找了下解决方法,在此记录下.因为本博主的电脑是windows的,所以这里只能提供windows的方法啦. 解决方法很简 ...

随机推荐

  1. Nginx rewrite(重读)

    Nginx Rewrite规则相关指令  Nginx Rewrite规则相关指令有if.rewrite.set.return.break等,其中rewrite是最关键的指令.一个简单的Nginx Re ...

  2. 第24篇 js小知识和“坑”

    前面说了说了js的相关知识,基本上除了语法外,把项目常用的知识做了一个梳理,现在说下js的其它方面的知识,这些知识不成体系,属于不理解对于一般开发没什么太多影响,但如果理解清楚,可以更好去开发. js ...

  3. 【Unity编程】Unity中的欧拉旋转

    欧拉角的定义 在写这篇博客之前,我搜索了网上很多关于欧拉角的定义,发现大部分引用自维基百科的定义,我这里也引述一下: 维基百科定义 莱昂哈德·欧拉用欧拉角来描述刚体在三维欧几里得空间的取向.对于任何参 ...

  4. PHP解耦的三重境界(浅谈服务容器)

    阅读本文之前你需要掌握:PHP语法,面向对象 在完成整个软件项目开发的过程中,有时需要多人合作,有时也可以自己独立完成,不管是哪一种,随着代码量上升,写着写着就"失控"了,渐渐&q ...

  5. Adapter基本用法

    使用流程 graph LR A(新建适配器) -->B(绑定数据源) B-->C(设置适配器) 1. ArrayAdapter new ArrayAdapter<?>(cont ...

  6. lnmp pathinfo问题

    location / {              if (!-e $request_filename) {              rewrite  ^/(.*)$  /index.php/$1  ...

  7. idea 使用常见问题处理

    问题一: 项目中使用了 lombok,但是代码中一直报错,提示 bean 注入失败,set 和 get 方法都飘红 解决:idea 中安装 lombok 插件,安装方法自行百度吧~ 如果是用的 ecl ...

  8. 那些"不务正业"的IT培训公司

    前言 大四下期了,现在准备找一份Java开发的实习工作,于是在各大网站上投递简历-智联招聘.51job.拉勾网,慧眼识真金的我必然会把培训机构给过滤掉,对于重庆来说招聘实习的公司少之又少,然而是智联招 ...

  9. SpringMVC中@RequestBody引起的400异常处理,返回校验失败具体信息

    问题 使用@RequestBody接收一个json数据的时候,如果传入的参数不符合条件,就会直接返回400的error page. 但究竟是为什么会400并没有抛出来.这对大量参数字段的我们来说,排错 ...

  10. webService常见问题

    1.普通字符串(日期形式)转换为XMLGregorianCalendar SimpleDateFormat simpleDateFormat =new SimpleDateFormat("y ...