安装Head插件

由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包。

<1>安装Node.js

下载解压

wget https://nodejs.org/dist/v6.10.2/node-v6.10.2-linux-x64.tar.xz
xz –d node-v6.10.2-linux-x64.tar.xz
tar xvf node-v6.10.2-linux-x64.tar
mv node-v6.10.2-linux-x64 /usr/local/node

配置并生效

vim /etc/profile
export NODE_HOME=/usr/local/node
export PATH=$PATH:$NODE_HOME/bin source /etc/profile

查看版本验证

[elsearch@imok bin]$ node -v
v6.10.2
[elsearch@imok bin]$ npm -v
3.10.10

<2>下载head插件

如果未安装git ,则先安装git工具

yum install –y git

git clone https://github.com/mobz/elasticsearch-head.git

<3>安装grunt

cd elasticsearch-head
npm install -g grunt --registry=https://registry.npm.taobao.org

<4>安装插件

npm install  --unsafe-perm

在elasticsearch-head目录下node_modules/grunt下如果没有grunt二进制程序,需要执行:

npm install grunt --save 

<5>修改配置 elasticsearch-head下Gruntfile.js文件

修改connect配置节点

修改 _site/app.js 修改http://localhost:9200字段到本机ES端口与IP

<6>修改 elasticsearch配置文件

修改elasticsearch.yml文件加入以下内容:

# 是否支持跨域
http.cors.enabled: true # *表示支持所有域名
http.cors.allow-origin: "*"

<7>启动head插件服务(后台运行)

/elasticsearch-head/node_modules/grunt/bin/grunt server &

<8>查看

如下图说明安装OK

安装中文分词器

中文分词器的版本和elasticsearch的版本要一致。随笔中安装的是6.3.2版本

$ ./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.3.2/elasticsearch-analysis-ik-6.3.2.zip

安装OK后重启elasticsearch服务

安装过程遇到的问题:

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]

解决:vim /etc/security/limits.conf ,在文件末尾添加以下参数 (* 要带上)

* soft nofile 65536

* hard nofile 131072

* soft nproc 2048

* hard nproc 4096

ulimit -n查看进程数

[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

解决:修改 /etc/sysclt.conf配置

vi /etc/sysctl.conf

添加一下配置参数

vm.max_map_count=655360

执行命令

sysctl -p

重启elasticsearch服务即可。

参考:

  https://www.cnblogs.com/hunttown/p/6723286.html

  https://www.cnblogs.com/lizichao1991/p/7809156.html

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

  1. ELK 学习笔记之 elasticsearch head插件安装

    elasticsearch head插件安装: 准备工作: 安装nodejs和npm https://nodejs.org/en/download/ node-v6.11.2-linux-x64.ta ...

  2. Elasticsearch入门教程(一):Elasticsearch及插件安装

    原文:Elasticsearch入门教程(一):Elasticsearch及插件安装 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:h ...

  3. ElasticSearch head 插件安装

    head 客户端可以很方便在上面创建索引,类型,文档,还有查询,使用它管理elasticsearch 提高效率. 在安装head 客户端之前必须安装node.js 环境,因为它是用node.js 编写 ...

  4. Elasticsearch 监控插件安装(elasticsearch-head与Kibana)

    摘要 安装Elasticsearch插件Head与Kibana 版本 elasticsearch版本: elasticsearch-2.3.4 elasticsearch-head版本: 2.x(支持 ...

  5. Elasticsearch安装(四), elasticsearch head 插件安装和使用。

    安装方式如下: 一.安装Elasticsearch-Head 1.插件安装方式(推荐) #在Elasticsearch目录下 $/bin/plugin -install mobz/elasticsea ...

  6. 新版elasticsearch的插件安装

    安装 yum localinstall elasticsearch-6.1.1.rpm -y mkdir -p /elk/{data,logs} && chown -R elastic ...

  7. elasticsearch的插件安装

    目前使用的是2.4.5版本的es 安装的时候注意以下几点 : 1.如果想所有的ip都能访问es,需要修改config下的elasticsearch.yml.修改如下 network.host=0.0. ...

  8. ElasticSearch head插件安装与配置

    下载 下载地址:https://github.com/mobz/elasticsearch-head 安装 1. 下载到本地 git clone 2. 安装 grunt npm install -g ...

  9. ElasticSearch及其插件安装配置

    elasticsearch安装使用 .安装步骤: 1.下载elasticsearch的rpm包: wget https://artifacts.elastic.co/downloads/elastic ...

随机推荐

  1. 全排列 next_permutation 用法

    给一个正整数n,让你求它的全排列 先介绍一个函数,iota(a,a+n,1) 用法就是把a数组的第0位到第n-1位依次赋为1,2,.....n: 然后是next_permutation(a,a+4)函 ...

  2. jQuery对标签select优化:实现模糊搜索查询功能

    由于select标签中的option条数较多,翻页查询比较麻烦,需要对select标签进行优化,解决方法是通过增加模糊查询功能来提高用户体验感. 优化后的界面如下: 在实现这个优化的过程中,参考了两个 ...

  3. virtural machine eth1

    DEVICE=eth1HWADDR=00:50:56:33:EF:21TYPE=EthernetUUID=f35bd21c-9636-4e3f-a05c-bd4382c352bfONBOOT=yesN ...

  4. vim 插件 -- omnicppcomplete

    omnicppcomplete 插件是基于ctags来实现补全的.所以,要先安装好ctags才可以使用. 下载 https://www.vim.org/scripts/script.php?scrip ...

  5. 学习笔记——SM2算法原理及实现

    RSA算法的危机在于其存在亚指数算法,对ECC算法而言一般没有亚指数攻击算法 SM2椭圆曲线公钥密码算法:我国自主知识产权的商用密码算法,是ECC(Elliptic Curve Cryptosyste ...

  6. react 表单获取多个input

    react  表单this.handleChange(key,e){ [key]:e.target.value} submit=()=>{ const {userName,age,status} ...

  7. SQL DELETE 语句详解

    SQL DELETE 语句详解   DELETE 语句 DELETE 语句用于删除表中的行. 语法 DELETE FROM 表名称 WHERE 列名称 = 值 Person: LastName Fir ...

  8. vs2017如何设置类或函数前不显示引用的数量

    这几天,从vs2013换成vs2017,17版本增加了一个类或函数前提示引用的数量,这个感觉很别扭,如何取消显示这个呢? 问题如下: 取消显示这个引用的步骤: 找到菜单栏: 工具 ---> 选项 ...

  9. encodeURIComponent编码与解码

    问题:JavaScript用encodeURIComponentt编码后无法再后台解码的问题. 目前写法: window.self.location="list.jsp?searchtext ...

  10. 经典的Foo和getName

    搜了下经典的Foo和getName的题目,看了几个解释,懒得看,自己解一下,作为笔记. function Foo(){ getName = function(){ console.log(1); }; ...