安装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. [easyUI] 树形菜单 tree

    0.效果图 1. 一个id为mytree的无序列表 <h2>easy UI Tree</h2> <ul id="mytree"></ul& ...

  2. caffe-windows画loss与accuracy曲线

    参考博客: http://blog.csdn.net/sunshine_in_moon/article/details/53541573 进入tools/extra/文件夹中,修改plot_train ...

  3. caffe arm

    依赖库: sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-de ...

  4. edu30F. Forbidden Indices

    题意:给你一个字符串s有一些位置被ban了,字符串t的价值是|t|*t在s中出现次数而且终点没有被ban.问你最大的价值是多少 题解:很明显t是s子串,建个sam,对于sam中每个位置,我们需要删除中 ...

  5. Python requests代理

    self.ip=requests.get('http:ip获取') self.ip=(self.ip.text).replace('\r','').replace('\n','') print('IP ...

  6. C++将十进制数转化为二进制

    #include<iostream> using namespace std; void main() { ; ]; cin>>n; i=n; while(i) { a[j]= ...

  7. 使用npm install时一直报错-4048 operation not permitted

    一:权限问题 首先看到operation not permitted我们能想到权限问题,所以这时候我们可以以管理员身份运行cmd或者直接快捷键Win+X来打开. 二:依赖包错误 如上图,根据错误日志我 ...

  8. Java反序列化漏洞实现

    一.说明 以前去面试被问反序列化的原理只是笼统地答在参数中注入一些代码当其反序列化时被执行,其实“一些代码”是什么代码“反序列化”时为什么就会被执行并不懂:反来在运营商做乙方经常会因为java反反序列 ...

  9. Mac上实现ProxyChains-NG终端代理

    附上官方网站,可以自行查看:https://github.com/rofl0r/proxychains-ng 操作步骤如下: 1.在终端上用brew 安装ProxyChains-NG brew ins ...

  10. windows下telnet不是内部或外部命令

    选择“程序和功能” 设置完后