基础环境

Elasticsearch集群搭建请参考前一篇文章
http://www.cnblogs.com/aubin/p/8012840.html

系统 节点名 IP 软件版本
CentOS7.3 els1 172.18.68.11 Elasticsearch6.0
CentOS7.3 els2 172.18.68.12 Elasticsearch6.0
CentOS7.3 els3 172.18.68.13 Elasticsearch6.0

一、安装

  • 插件官网地址https://github.com/mobz/elasticsearch-head
  • 由于插件时托管在github中,要从github中直接下载所以需要先安装git
  • 安装插件时又使用到了npm,所以npm同时都安装上(注意:npm在epel源中)
  1. yum install git npm # npm在epel源中
  2. git clone https://github.com/mobz/elasticsearch-head.git # 安装过程需要连接互联网
  3. cd elasticsearch-head # git clone后会自动生成的一个目录
  4. npm install
  5. nohup npm run start & #后台启动

二、测试

使用浏览器打开http://172.18.68.11:9200。如果能正常打开说明head插件安装正确
现在集群健康状态哪里显示未连接,这是因为head插件没有权限获取集群节点的信息,接下来设置权限

三、权限设定

如果想查询集群健康信息,那么需要在elasticsearch配置文件中授权

  1. vim /etc/elasticsearch/elasticsearch.yml
  2. http.cors.enabled: true # elasticsearch中启用CORS
  3. http.cors.allow-origin: "*" # 允许访问的IP地址段,* 为所有IP都可以访问

四、测试

    • 填入测试索引

      1. curl -XPUT '172.18.68.11:9100/book'
    • 打开浏览器
      再次通过浏览器打开,填入已经授权节(上面的两行配置)点IP地址,点击链接,就可以看到集群健康信息与测试索引的分片信息。
    • 点数据浏览就可以查看到所有的信息,不过这里没有插入数据也就看不到。接下来的文章会记录如何输入、输出、过滤数据

    • 如npm install有这个报错的话
    • npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.
    • 发现最直接有效的方法是升级openssl,执行yum update openssl -y命令即可。

      升级之前版本信息:

      [root@localhost elasticsearch-head]# openssl version
      OpenSSL 1.0.1i 6 Aug 2014

      升级之后:

      [root@localhost elasticsearch-head]# openssl version
      OpenSSL 1.0.2k-fips 26 Jan 2017

  • 报一下错误时
    • npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
      npm WARN elasticsearch-head@0.0.0 license should be a valid SPDX license expression
      npm ERR! Linux 3.10.0-514.el7.x86_64
      npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
      npm ERR! node v6.14.2
      npm ERR! npm v3.10.10
      npm ERR! code ELIFECYCLE

      npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
      npm ERR! Exit status 1

    • yum install -y bzip2

安装Elasticsearch中Head插件并使用的更多相关文章

  1. eclipse安装activiti5.18.0工作流插件 以及安装过程中activiti插件出现的问题及解决

    转: eclipse安装activiti5.18.0工作流插件 以及安装过程中activiti插件出现的问题及解决 2017年05月04日 18:44:21 JJ_nan 阅读数:2773   版权声 ...

  2. Elasticsearch中Head插件的使用

    在学习Elasticsearch的过程中,必不可少需要通过一些工具查看es的运行状态以及数据.如果都是通过rest请求,未免太过麻烦,而且也不够人性化.此时,head可以完美的帮助你快速学习和使用El ...

  3. docker安装elasticsearch及head插件

    使用 Docker 拉取ElasticSearch镜像 docker pull elasticsearch:7.0.0 查看镜像 ID docker images 运行 docker run -e E ...

  4. ubuntu安装elasticsearch及head插件

    1.安装elasticsearch,参考http://www.cnblogs.com/hanyinglong/p/5409003.html就可以了 简单描述下: mkdir -p /usr/local ...

  5. centos7安装Elasticsearch及Es-head插件详细教程(图文)

    懒惰了很久,今天来写一下Elasticsearch在centos7上安装教程以及安装过程中可能出现的报错解决方式,有不对的地方,烦请各位看官多多指教! 一.ES安装 1.环境检查 确保有java环境, ...

  6. docker安装elasticsearch和head插件

    使用 Docker 拉取ElasticSearch镜像 docker pull elasticsearch:7.0.0 查看镜像 ID docker images 运行 docker run -e E ...

  7. windows下安装ElasticSearch的Head插件

    es5以上版本安装head需要安装node和grunt(之前的直接用plugin命令即可安装) (一)从地址:https://nodejs.org/en/download/ 下载相应系统的msi,双击 ...

  8. windows安装elasticsearch和elasticsearch-head插件

    1.去官网下载最新软件 选择zip包,https://www.elastic.co/downloads/elasticsearch 2.下载node 必须 > 6.0已上 3.解压elastic ...

  9. win7安装Elasticsearch和Elasticsearch-Head插件

    1.环境搭建 1)Java环境搭建可以参考相关的资料,这里不做详细介绍 2)nodejs环境搭建 到官方网站下载相应的zip包:https://nodejs.org/dist/v8.9.1/node- ...

随机推荐

  1. React createRef:引用

    一 代码 import React, { Component } from 'react'; class Box extends Component { render() { return <b ...

  2. Curator框架基础使用

    为了更好的实现java操作zookeeper服务器.后来出现Curator框架,非常强大,目前已经是Apache的顶级项目,有丰富的操作,,例如:session超时重连,主从选举.分布式计数器,分布式 ...

  3. 转)Ubuntu16.04下安装DDD(Data Display Debugger)

    以下转自:http://www.linuxdiyf.com/linux/26393.html   前两天在Linux论坛偶然间看到了DDD这个软件,根据介绍是一个gdb界面化的调试软件,这正是我找了好 ...

  4. 42 【docker】run命令

    最常用的两个option是,网络端口映射,和文件共享 最基本的启动命令(从image创建一个container并启动):docker run -d <image-name> -d:表示守护 ...

  5. 图片利用 new Image()预加载原理 和懒加载的实现原理

    二:预加载和懒加载的区别 预加载与懒加载,我们经常经常用到,这些技术不仅仅限于图片加载,我们今天讨论的是图片加载: 图片预加载:顾名思义,图片预加载就是在网页全部加载之前,提前加载图片.当用户需要查看 ...

  6. Git 在团队中的使用--如何正确使用Git Flow

    Git的优点 Git的优点很多,但是这里只列出我认为非常突出的几点. 由于是分布式,所有本地库包含了远程库的所有内容. 优秀的分支模型,打分支以及合并分支,机器方便. 快速,在这个时间就是金钱的时代, ...

  7. AutoCAD开发4--添加块)

    Private Sub CommandButton3_Click() Dim pInsertPnt As Variant 'pInsertPnt(0) = 100.5141: pInsertPnt(1 ...

  8. 后台获取url里面加密的参数中,特殊符号+获取到后端后是 一个空格的解决方法

    进行加密,加密后的参数中有个+号: 前端的url:http://mtest.cmread.com:8145/nap/p/QRcode.jsp?activityId=11206&vcode=O/ ...

  9. hdu 1325 && poj 1308 Is It A Tree?(并查集)

    Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a ...

  10. 1.2万事开头hello world+交互+getpass、sys模块初识

    1.python的hello world: ①运行cmd-输入python-输入print (“hello world!”) ②创造.py的文本helloworld.py(后缀是为了告诉其他人)-输入 ...