安装Elasticsearch中Head插件并使用
基础环境
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源中)
yum install git npm # npm在epel源中
git clone https://github.com/mobz/elasticsearch-head.git # 安装过程需要连接互联网
cd elasticsearch-head # git clone后会自动生成的一个目录
npm install
nohup npm run start & #后台启动
二、测试
使用浏览器打开http://172.18.68.11:9200。如果能正常打开说明head插件安装正确
现在集群健康状态哪里显示未连接,这是因为head插件没有权限获取集群节点的信息,接下来设置权限
三、权限设定
如果想查询集群健康信息,那么需要在elasticsearch配置文件中授权
vim /etc/elasticsearch/elasticsearch.yml
http.cors.enabled: true # elasticsearch中启用CORS
http.cors.allow-origin: "*" # 允许访问的IP地址段,* 为所有IP都可以访问
四、测试
填入测试索引
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 ELIFECYCLEnpm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1- yum install -y bzip2
安装Elasticsearch中Head插件并使用的更多相关文章
- eclipse安装activiti5.18.0工作流插件 以及安装过程中activiti插件出现的问题及解决
转: eclipse安装activiti5.18.0工作流插件 以及安装过程中activiti插件出现的问题及解决 2017年05月04日 18:44:21 JJ_nan 阅读数:2773 版权声 ...
- Elasticsearch中Head插件的使用
在学习Elasticsearch的过程中,必不可少需要通过一些工具查看es的运行状态以及数据.如果都是通过rest请求,未免太过麻烦,而且也不够人性化.此时,head可以完美的帮助你快速学习和使用El ...
- docker安装elasticsearch及head插件
使用 Docker 拉取ElasticSearch镜像 docker pull elasticsearch:7.0.0 查看镜像 ID docker images 运行 docker run -e E ...
- ubuntu安装elasticsearch及head插件
1.安装elasticsearch,参考http://www.cnblogs.com/hanyinglong/p/5409003.html就可以了 简单描述下: mkdir -p /usr/local ...
- centos7安装Elasticsearch及Es-head插件详细教程(图文)
懒惰了很久,今天来写一下Elasticsearch在centos7上安装教程以及安装过程中可能出现的报错解决方式,有不对的地方,烦请各位看官多多指教! 一.ES安装 1.环境检查 确保有java环境, ...
- docker安装elasticsearch和head插件
使用 Docker 拉取ElasticSearch镜像 docker pull elasticsearch:7.0.0 查看镜像 ID docker images 运行 docker run -e E ...
- windows下安装ElasticSearch的Head插件
es5以上版本安装head需要安装node和grunt(之前的直接用plugin命令即可安装) (一)从地址:https://nodejs.org/en/download/ 下载相应系统的msi,双击 ...
- windows安装elasticsearch和elasticsearch-head插件
1.去官网下载最新软件 选择zip包,https://www.elastic.co/downloads/elasticsearch 2.下载node 必须 > 6.0已上 3.解压elastic ...
- win7安装Elasticsearch和Elasticsearch-Head插件
1.环境搭建 1)Java环境搭建可以参考相关的资料,这里不做详细介绍 2)nodejs环境搭建 到官方网站下载相应的zip包:https://nodejs.org/dist/v8.9.1/node- ...
随机推荐
- Linux上web服务器搭建
安装php依赖包: yum -y install gcc gcc++ libxml2 libxml2-devel yum install gcc make gd-devel libjpeg-devel ...
- as3.0 嵌入字体的用法
var txt:TextField = new TextField();//创建文本 txt.embedFonts=true;//确定嵌入字体 var font:Font=new MyFont();/ ...
- Handler实现消息的定时发送
话不多说,直接上代码 private Handler mHandler = new Handler() { @Override public void handleMessage(Message ms ...
- Linux云服务器
1. 第一步:前往阿里云官网注册账号,实名认证.进去云服务器,创建实例! 第二步:选配置,**公网IP地址选择“分配”!**如果你是首次购买主机,安全组先不必勾选,或者勾选默认的 .后面,会有安全组的 ...
- swift 监测内存泄漏 MLeaksFinder
使用MLeaksFinder检测项目内存泄露总结 https://www.cnblogs.com/ocarol/p/5288497.html
- linux 下安装arm-linux-gnueabi交叉编译器
1,开发平台 虚拟机:vm12 系统:ubuntu14.04 LTS 32位 2.准备ARM交叉编译工具包 编译uboot和linux kernel都需要ARM交叉工具链支持,这里使用Linaro提 ...
- Java代码获取spring 容器的bean几种方式
一.目的 写了一个项目,多个module,然后想在A模块中实现固定的config注入,当B模块引用A时候,能够直接填写相对应的配置信息就行了.但是遇到一个问题,B引用A时候,A的配置信息总是填充不了, ...
- centos7.2 下 nginx 开机启动
1.在系统服务目录里创建nginx.service文件 1 vi /lib/systemd/system/nginx.service 内容如下 1 2 3 4 5 6 7 8 9 10 11 12 1 ...
- Catalan数与出栈顺序个数,Java编程模拟
问题描述: 队列中有从1到7(由小到大排列)的7个整数,问经过一个整数栈后,出栈的所有排列数有多少?如果整数栈的容量是4(栈最多能容纳4个整数),那么出栈的排列数又是多少? 分析:对于每一个数字i, ...
- OpenCV2.4.10 + VS2010开发环境配置
原文转载自:qinyang8513 一.开发环境 1.操作系统:Windows 7(64位) 2.编程环境:Microsoft Visual Studio 2010 3.OpenCV版本:2.4.10 ...