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. css 居中,中央

    在我的技巧里,有4中居中中央的方法: 1.position:absolute; top:50%;left:50%; margin : -x 0 0 -x; 这是绝对定位的方法,通过算法移动,坏处就是必 ...

  2. VUE2.0实现购物车和地址选配功能学习第二节

    第二节 创建VUE实例 购物车项目计划: 1.创建一个vue实例 2.通过v-for指令渲染产品数据 3.使用filter对金额和图片进行格式化 4.使用v-on实现产品金额动态计算 5.综合演示 ① ...

  3. db2 load乱码问题

    在使用db2过程中经常需要从一个库里拿数据到自己库里来,通常需要将源表的数据导为数据文件,通过数据文件load到自己库里. 这个过程如果两个库的字符编码不一致,常规导入导出就会出现中文乱码. 以下是两 ...

  4. 自定义分页Gridview中Excel导出

    先上图,如图所示导出所有查询出的数据 用的是AspNetPager分页控件,这个导出方法,不受分页和gridview列中数据的约束,可以导出您想导出的数据 首先前台页面代码,lblink即为导出exc ...

  5. 偶尔发生File has been moved - cannot be read again,其实是个误解

    使用poi上传.xlsx文件时,出现如下错误 Exception in thread "pool-3-thread-2" java.lang.IllegalStateExcepti ...

  6. 基于 Koa平台Node.js开发的KoaHub.js的模板引擎代码

    koahub-handlebars koahub-handlebars koahub handlebars templates Installation $ npm install koahub-ha ...

  7. ajax 提交表单(文件)

    废话不多说,自己看代码 引入的jquery <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js&quo ...

  8. hdoj1242(bfs+priority_queue)

    之前用dfs剪枝AC了,http://www.cnblogs.com/ediszhao/p/4741825.html,这次用bfs+priority_queue来尝试解题 题意:拯救行动,天使r有多个 ...

  9. js面向对象总结

    原型链 新创建的xiaoming的原型链是: xiaoming ----> Student.prototype ----> Object.prototype ----> null 也 ...

  10. cheatsheet——mac 上的一款可以显示软件所有快捷键的小工具

    https://www.mediaatelier.com/CheatSheet/ 发现一款可以显示 mac 上各种软件所有快捷键的小工具:cheatsheet,只要长按 command 键就可以了~ ...