ElasticSearch-Head 安装配置
因为安装 ElasticSearch-Head 需要使用到 npm 包管理器,所以需要我们提前安装好 NodeJS ,安装 NodeJS 的方法可以参考:https://juejin.im/post/5ad424c16fb9a028c06b48f0安装好 nodejs 之后,我们开始安装 ElasticSearch-Head

[root@localhost /home]# git clone git://github.com/mobz/elasticsearch-head.git
[root@localhost /home]# cd elasticsearch-head
[root@localhost /home]# npm install

若在 npm install 的过程中报错:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! phantomjs-prebuilt@2.1.16 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs-prebuilt@2.1.16 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:

解决方法:
[root@localhost /home]# npm install phantomjs-prebuilt@2.1.16 --ignore-scripts

然后重新执行
[root@localhost /home]# npm install 
依赖安装完成后,我们需要修改一些配置

1.修改Gruntfile.js,允许外网访问 elasticsearch-head

[root@localhost /home]# vim elasticsearch-head/Gruntfile.js
找到 grunt.initConfig 中的 connect 配置,在 options 中添加 hostname: '*',(注意,冒号后面有个空格)

connect: {
        server: {
               options: {
                        hostname: '*',
                     port: 9100,
                     base: '.',
                     keepalive: true
                }
         }
}
2.修改默认连接地址,配置 elasticsearch-head 监控的elasticsearch节点IP地址

[root@localhost /home]# vim elasticsearch-head/_site/app.js

找到 this.base_uri 的配置(在4354行左右,可以通过搜索找到)
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
将 localhost 修改成 elasticsearch 所在的服务器地址
3.配置 elasticsearch 允许跨域访问

[root@localhost /home]# elasticsearch-6.4.2/config/elasticsearch.yml
在文件结尾添加两行配置:(同样的,每行开头和冒号后面都需要加一个空格)
 http.cors.enabled: true
 http.cors.allow-origin: '*'
4.防火墙开启9100端口,并重启防火墙

[root@localhost /home]# firewall-cmd --zone=public --add-port=9100/tcp --permanent
[root@localhost /home]# firewall-cmd --reload
这样,我们的 ElasticSearch 和 ElasticSearch-Head 已完成基本的配置,我们可以启动并查看效果

# 切换用户
[root@localhost /home]# su esroot

# 启动 ElasticSearch 服务
[esroot@localhost /home]$ elasticsearch-6.4.2/bin/elasticsearch

# 启动 ElasticSearch-Head
[esroot@localhost /home]$ cd elasticsearch-head
[esroot@localhost /home]$ npm run start
(注:如果需要放到后台运行,可以采用nohup的形式,即:nohup npm run start &)
我们可以查看当前端口情况

[root@localhost /home]$ netstat -tunlp
可以看到,目前9100、9200、9300端口正在运行,其中:
9100端口:ElasticSearch-Head 占用端口
9200、9300端口:ElasticSearch 占用端口,9200是http协议的RESTful接口,9300是tcp通讯端口,集群间和TCPClient都走的它

Kibana 安装配置
注:安装Kibana的版本需要与ElasticSearch的版本保持一致

1.下载、解压

# 下载
[root@localhost home]# wget https://artifacts.elastic.co/downloads/kibana/kibana-6.4.2-linux-x86_64.tar.gz

# 解压
[root@localhost home]# tar -zxvf kibana-6.4.2-linux-x86_64.tar.gz
[root@localhost home]# mv kibana-6.4.2-linux-x86_64 kibana-6.4.2
2.修改配置文件

# 提权
[root@localhost home]# su

# 编辑配置文件
[root@localhost home]# vim kibana-6.4.2/config/kibana.yml

修改 server.host 和 elasticsearch.url 的配置,分别指定 kibana 和 elasticsearch 所在的服务器及端口
server.host: "localhost"
elasticsearch.url: "http://localhost:9200"
3.开启5601端口

# 开启防火墙
[root@localhost home]# systemctl start firewalld

# 允许端口
[root@localhost home]# firewall-cmd --zone=public --add-port=5601/tcp --permanent

# 重启防火墙
[root@localhost home]# systemctl restart firewalld
4.启动 Kibana

# 启动 ElasticSearch 服务(若已启动,则忽略)
[root@localhost /home]# elasticsearch-6.4.2/bin/elasticsearch

# 启动 Kibana
[root@localhost /home]# kibana-6.4.2/bin/kibana
按照以上步骤 ElasticSearch 和 Kibana 应该是可以正常运行起来的,我们可以通过访问 http://<kibana_server_ip>:5601 看是否启动成功

中文分词器 IK

首先进入到 ElasticSearch 的路径下面,然后执行下面的命令,其中的 6.4.2 替换成你的 ElasticSearch 版本

./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.4.2/elasticsearch-analysis-ik-6.4.2.zip
安装完后重启 ElasticSearch 即可(注意需要使用 esroot 用户启动)
---------------------

原文:https://blog.csdn.net/zhu815496402/article/details/83181300

elk插件以及分词器安装的更多相关文章

  1. elasticsearch kibana + 分词器安装详细步骤

    elasticsearch kibana + 分词器安装详细步骤 一.准备环境 系统:Centos7 JDK安装包:jdk-8u191-linux-x64.tar.gz ES安装包:elasticse ...

  2. 七、Elasticsearch+elasticsearch-head的安装+Kibana环境搭建+ik分词器安装

    一.安装JDK1.8 二.安装ES 三个节点:master.slave01.slave02 1.这里下载的是elasticsearch-6.3.1.rpm版本包 https://www.elastic ...

  3. Elasticsearch教程(三),IK分词器安装 (极速版)

    如果只想快速安装IK,本教程管用.下面看经过. 简介: 下面讲有我已经打包并且编辑过的zip包,你可以在下面下载即可. 当前讲解的IK分词器 包的 version 为1.8. 一.下载zip包. 下面 ...

  4. elasticsearch 之IK分词器安装

    IK分词器地址:https://github.com/medcl/elasticsearch-analysis-ik 安装好ES之后就可以安装分词器插件了 记住选择ES对应的版本 对应的有版本选择下载 ...

  5. es-07-head插件-ik分词器插件

    5.x以后, es对head插件的支持并不是特别好 而且kibana的功能越来越强大, 建议使用kibana 1, head插件安装 在一台机器上安装head插件就可以了 1), 更新,安装依赖 su ...

  6. elasticsearch ik中文分词器安装

    特殊说明:灰色文字用来辅助理解的. 安装IK中文分词器 我在百度上搜索了下,大多介绍的都是用maven打包下载下来的源码,这种方法也行,但是不够方便,为什么这么说? 首先需要安装maven吧?其次需要 ...

  7. 【python】泰语分词器安装

    1.安装icu http://blog.csdn.net/liyuwenjing/article/details/6105388 2.安装pyicu https://anaconda.org/kale ...

  8. ES中文分词器安装以及自定义配置

    之前我们创建索引,查询数据,都是使用的默认的分词器,分词效果不太理想,会把text的字段分成一个一个汉字,然后搜索的时候也会把搜索的句子进行分词,所以这里就需要更加智能的分词器IK分词器了. ik分词 ...

  9. es的插件 ik分词器的安装和使用

    今天折腾了一天,在es 5.5.0 上安装ik.一直通过官方给定的命令没用安装成功,决定通过手工是形式进行安装.https://github.com/medcl/elasticsearch-analy ...

随机推荐

  1. MongoDB 提升性能的18原则(开发设计阶段)

    MongoDB 是高性能数据,但是在使用的过程中,大家偶尔还会碰到一些性能问题.MongoDB和其它关系型数据库相比,例如 SQL Server .MySQL .Oracle 相比来说,相对较新,很多 ...

  2. 【原】Java学习笔记025 - 内部类

    package cn.temptation; public class Sample01 { public static void main(String[] args) { // 内部类(嵌套类): ...

  3. windows10禁用更新方法

    本方法由本人在无意中发现,实测有效 1.第一步 打开文件管理器路径进入到win10的下载更新文件的目录 C:\Windows\SoftwareDistribution ​ 选中Download文件夹 ...

  4. SQLServer之删除索引

    使用SSMS数据库管理工具删除索引 使用表设计器删除索引 表设计器可以删除任何类型的索引,本示例演示删除XML辅助索引,删除其他索引步骤相同. 1.连接数据库,选择数据库,展开数据库->选择数据 ...

  5. 第二节 pandas 基础知识

    pandas 两种数据结构 Series和DataFrame 一  Series 一种类似与一维数组的对象 values:一组数据(ndarray类型) index:相关的数据索引标签 1.1  se ...

  6. Docker(1):CentOS7 安装Docker

    1.查看系统内核,docker要求系统的内核版本高于3.10 #  uname -r 2.升级yum包,确保最新 #   yum update 3.安装所需要依赖包 #   yum install - ...

  7. R语言学习——数据框

    > #数据框可以包含不同模式(数值型.字符型.逻辑型等)的数据,是R中最常处理的数据结构.数据框可以通过函数data.frame()创建:mydata<-data.frame(coll,c ...

  8. [LeetCode] 6. Z 字形变换

    题目链接:(https://leetcode-cn.com/problems/zigzag-conversion/) 题目描述: 将一个给定字符串根据给定的行数,以从上往下.从左到右进行 Z 字形排列 ...

  9. sqlServer:行列转换之多行转一行

    1.建表:学生表(姓名,学科,成绩) CREATE TABLE teststudent(    stuname varchar(50) NULL,    subjects varchar(50) NU ...

  10. Java的get、post请求

    URLConnection package com.shuzf.http; import java.io.BufferedReader; import java.io.IOException; imp ...