一、简介

  elasticsearch-head是一个界面化的集群操作和管理工具,可以对集群进行傻瓜式操作。你可以通过插件把它集成到es(首选方式),也可以安装成一个独立webapp。

  Elasticsearch 5 以上版本已经不支持 site plugins 的方式安装head插件了,所以 head 需要作为一个单独的服务进行安装。

  官方的文档:https://github.com/mobz/elasticsearch-head

  • for Elasticsearch 5.x: site plugins are not supported. Run as a standalone server
  • for Elasticsearch 2.x: sudo elasticsearch/bin/plugin install mobz/elasticsearch-head
  • for Elasticsearch 1.x: sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/1.x
  • for Elasticsearch 0.x: sudo elasticsearch/bin/plugin -install mobz/elasticsearch-head/0.9

二、安装环境

  head下载:wget https://github.com/mobz/elasticsearch-head/archive/master.zip 或者github下载:https://github.com/mobz/elasticsearch-head

  head插件是一个nodejs的项目,因此需要安装node环境,使用npm来安装依赖的包。地址:http://nodejs.org/dist/v8.1.4/node-v8.1.4-linux-x64.tar.gz

三、安装过程

  1. 安装node   

  # yum -y install gcc make gcc-c++ openssl-devel
  # tar -zxvf node-v8.1.4-linux-x64.tar.gz
  # vim /etc/profile
     export NODE_HOME=/opt/es/node/node-v8.1.4-linux-x64
     export PATH=$NODE_HOME/bin:$PATH
  # source /etc/profile
 验证是否安装成功
  # node -v && npm -v
    v8.1.4
    5.0.3
  也可以通过yum快捷安装node
  # yum install nodejs -y    

  2. 安装grunt

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

  # unzip elasticsearch-head-master.zip
  # cd elasticsearch-head-master
  # npm install(此过程有可能nmp报错,需要取消ssl验证:npm config set strict-ssl false)
  # npm install grunt-cli(windows:npm install grunt-cli -g) 
安装完验证一下:
  # ./node_modules/grunt/bin/grunt -version
    grunt-cli v1.2.0
    grunt v1.0.1
  

  3. 修改配置文件  

  # vim elasticsearch-head-master/Gruntfile.js(增加增加hostname属性,设置为*:hostname: '*',)
    

    

  修改连接 Elasticsearch 的地址,elasticsearch-head-master/_site/app.js,修改 localhost:9200 为实际 Elasticsearch 的地址

    # vim elasticsearch-head-master/_site/app.js(搜关键字9200找到位置)

      this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://es真实地址:9200";

  修改 Elasticsearch 配置文件elasticsearch.yml,增加下面两个配置:

    http.cors.enabled: true

    http.cors.allow-origin: "*"

四、启动head

  启动 head 插件之前,需要先启动 Elasticsearch 服务

  前台启动:./elasticsearch-head-master/node_modules/grunt/bin/grunt server

  后台启动: nohup ./elasticsearch-head-master/node_modules/grunt/bin/grunt server &

  然后在浏览器输入地址 ip:9100 即可测试结果

  

Elasticsearch 安装head插件的更多相关文章

  1. ElasticSearch安装SQL插件

    ElasticSearch安装SQL插件下载地址(中国大佬开发的,膜拜ing):https://github.com/NLPchina/elasticsearch-sql 1.记得选择和自己Elast ...

  2. Elasticsearch安装X-Pack插件

    Elasticsearch安装X-Pack插件, 基于已经安装好的6.2.2版本的Elasticsearch, 安装6.2.2版本的X-Pack插件. 1.下载x-pack的zip包到本地 https ...

  3. elasticsearch安装head插件

    安装Head插件 由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包. <1>安装Node.js 下载解压 wget https://node ...

  4. ElasticSearch安装拼音插件 elasticsearch-analysis-pinyin

    elasticsearch-analysis-pinyin 是 ElasticSearch的拼音插件.强大的功能支持拼音等的搜索 1.下载源代码 源码地址https://github.com/medc ...

  5. elasticsearch 安装 head插件

    head插件 切换到Elasticsearch的安装目录 cd ~/demo/elasticsearch/es1 执行安装命令 [root@localhost es1]# bin/plugin ins ...

  6. Elasticsearch安装 + Head插件安装 + Bigdesk插件安装

    一.Elasticsearch安装 1.官网下载zip包:https://www.elastic.co/downloads/elasticsearch 2.解压到自己指定的文件夹 3.运行\bin\e ...

  7. Elasticsearch 安装 Head 插件

    引子:在上一篇文章Elasticsearch入门(一):CentOS 7.6 安装ES 7.0.0中,我们讲了如何在CentOS 7.6环境下安装 Elasticsearch 7.0.下面,我将讲一讲 ...

  8. elasticsearch安装marvel插件

    Marvel插件要在Elasticsearch和Kibana中同时安装.Step 1: Install Marvel into Elasticsearch: bin/plugin install li ...

  9. ElasticSearch安装拼音插件(pinyin)

    环境介绍 集群环境如下: Ubuntu14.04 ElasticSearch 2.3.1(3节点) JDK1.8.0_60 开发环境: Windows10 JDK 1.8.0_66 Maven 3.3 ...

随机推荐

  1. CentOS 7系统yum仓库搭建方法

    YUM: Yellowdog Update Modifier,rpm的前端程序,可解决软件包相关依赖性,可在多个库之间定位软件包,up2date的替代工具,是为了进一步简化RPM管理软件难度以及自动分 ...

  2. Zen Cart 138 在PHP5.3环境下出现的Fatal error: Cannot redeclare date_diff()

    Zen Cart 138 在PHP5.3环境下出现的Fatal error: Cannot redeclare date_diff() in includes/functions/functions_ ...

  3. DevExpress WinForms v19.1新版亮点:Tree List等控件性能增强

    行业领先的.NET界面控件DevExpress v19.1终于正式发布,本站将以连载的形式介绍各版本新增内容.在本系列文章中将为大家介绍DevExpress WinForms v19.1中新增的一些控 ...

  4. java 乱码

    https://blog.csdn.net/qq_27545063/article/details/81138722 https://blog.csdn.net/dachaoa/article/det ...

  5. ESP8266内置的定时器库--Ticker库

    Ticker的功能非常简单,就是规定时间后调用函数 总体上,根据功能可以把方法分为两大类: 定时器管理方法: 定时器启用方法: detach()     停止定时器 active()    定时器是否 ...

  6. mysql参数sql_log_bin配置

    mysql参数sql_log_bin配置 如果想在主库上执行一些操作,但不复制到slave库上,可以通过修改参数sql_log_bin来实现.比如说,这里模拟主从同步复制异常. 还有一种场景,就是导入 ...

  7. 【leetcode】Find K Pairs with Smallest Sums

    You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define ...

  8. Jenkins-ssh远程执行nohup- java无法退出

    一,初步 #执行方式 ssh 192.168.2.103 " nohup java -jar /home/a/ipf/ight/feedback/ixxxedback-platform-1. ...

  9. js 获取 URL的参数 session

    <script type="text/javascript"> window.onload = function () { //var content = getPar ...

  10. #417 Div2 Problem C Sagheer and Nubian Market (二分 && std::accumulate)

    题目链接 : http://codeforces.com/problemset/problem/812/C 题意 : 给你 n 件物品和你拥有的钱 S, 接下来给出这 n 件物品的价格, 这些物品的价 ...