当前位置: 首页 > news >正文

ES之二:centos7安装kibana和IK分词器

目录

  • 一、Kibana介绍
  • 二、Kibana安装
    • 1、注意elasticsearch 和 kibana使用同一个版本
    • 2、更改配置
    • 3、kibana使用
  • 三、Kibana安装
    • 1. 解压ik分词器
    • 2. 重新启动ES
        • 启动报错:

一、Kibana介绍

Kibana是一个针对Elasticsearch的开源分析及可视化平台,使用Kibana可以查询、查看并与存储在ES索引的数据进行交互操作,使用Kibana能执行高级的数据分析,并能以图表、表格和地图的形式查看数据。

二、Kibana安装

1、注意elasticsearch 和 kibana使用同一个版本

下载地址:https://www.elastic.co/cn/downloads/kibana

[root@localhost es7.14]# wget https://artifacts.elastic.co/downloads/kibana/kibana-7.14.0-linux-x86_64.tar.gz

2、更改配置

  1. 解压
    在这里插入图片描述

  2. 更改config/kibana.yml

    [root@localhost es7.14]# cd kibana-7.14
    [root@localhost kibana-7.14]# vim config/kibana.ymlserver.port: 15601# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
    # The default is 'localhost', which usually means remote machines will not be able to connect.
    # To allow connections from remote users, set this parameter to a non-loopback address.
    # 允许访问的IP,如果允许任何IP访问此处输入0.0.0.0
    server.host: "192.168.21.18"# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
    # Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
    # from requests it receives, and to prevent a deprecation warning at startup.
    # This setting cannot end in a slash.
    #server.basePath: ""# Specifies whether Kibana should rewrite requests that are prefixed with
    # `server.basePath` or require that they are rewritten by your reverse proxy.
    # This setting was effectively always `false` before Kibana 6.3 and will
    # default to `true` starting in Kibana 7.0.
    #server.rewriteBasePath: false# The maximum payload size in bytes for incoming server requests.
    #server.maxPayloadBytes: 1048576# The Kibana server's name.  This is used for display purposes.
    # 服务名称
    server.name: "ltkj-kibana"# The URLs of the Elasticsearch instances to use for all your queries.
    # ES服务地址
    elasticsearch.hosts: ["http://localhost:9200"]# When this setting's value is true Kibana uses the hostname specified in the server.host
    # setting. When the value of this setting is false, Kibana uses the hostname of the host
    # that connects to this Kibana instance.
    #elasticsearch.preserveHost: true
    #
    # Kibana uses an index in Elasticsearch to store saved searches, visualizations and
    # dashboards. Kibana creates a new index if the index doesn't already exist.
    # 创建的索引
    #kibana.index: ".kibana"
    #
    # # The default application to load.
    # #kibana.defaultAppId: "home"# # If your Elasticsearch is protected with basic authentication, these settings provide
    # # the username and password that the Kibana server uses to perform maintenance on the Kibana
    # # index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
    # # is proxied through the Kibana server.
    # 登录ES使用的用户名和密码
    #elasticsearch.username: "kibana"
    #elasticsearch.password: "pass"# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
    # These settings enable SSL for outgoing requests from the Kibana server to the browser.
    #server.ssl.enabled: false
    #server.ssl.certificate: /path/to/your/server.crt#server.ssl.key: /path/to/your/server.key
    #
    # Optional settings that provide the paths to the PEM-format SSL certificate and key files.
    # These files are used to verify the identity of Kibana to Elasticsearch and are required when
    # xpack.security.http.ssl.client_authentication in Elasticsearch is set to required.
    #elasticsearch.ssl.certificate: /path/to/your/client.crt
    #elasticsearch.ssl.key: /path/to/your/client.key# Optional setting that enables you to specify a path to the PEM file for the certificate
    # authority for your Elasticsearch instance.
    #elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]# To disregard the validity of SSL certificates, change this setting's value to 'none'.
    #elasticsearch.ssl.verificationMode: full# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
    # the elasticsearch.requestTimeout setting.
    #elasticsearch.pingTimeout: 1500# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
    # must be a positive intege
    #elasticsearch.requestTimeout: 30000
    #
    # # List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
    # # headers, set this value to [] (an empty list).
    # #elasticsearch.requestHeadersWhitelist: [ authorization ]
    #
    # Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
    # by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
    #elasticsearch.customHeaders: {}
    #
    # Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
    #elasticsearch.shardTimeout: 30000# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
    #elasticsearch.startupTimeout: 5000
    #
    # Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
    #elasticsearch.logQueries: false
    #
    # Specifies the path where Kibana creates the process ID file.
    #pid.file: /var/run/kibana.pid
    #
    ables you specify a file where Kibana stores log output.
    #logging.dest: stdout
    #
    # Set the value of this setting to true to suppress all logging output.
    #logging.silent: false# Set the value of this setting to true to suppress all logging output other than error messages.
    #logging.quiet: false# Set the value of this setting to true to log all events, including system usage information
    # and all requests.
    #logging.verbose: false# Set the interval in milliseconds to sample system and process performance
    # metrics. Minimum is 100ms. Defaults to 5000.
    #ops.interval: 5000# Specifies locale to be used for all localizable strings, dates and number formats.
    # Supported languages are the following: English - en , by default , Chinese - zh-CN .
    # 设置kibana为中文
    i18n.locale: "zh-CN"
  3. 用非root用户启动并赋权

    chown -R es:es kibana-7.6.1
    su es
    
  4. 启动kibanna
    在这里插入图片描述

3、kibana使用

  1. 使用kibana中的开发工具

  2. 更多操作
    这里的操作和restapi是一样的,好处是有自动提示,具体更多操作可以参考我的另一篇文章:
    Elasticsearch-02-es的restapi使用

三、Kibana安装

ik分词器: https://github.com/infinilabs/analysis-ik

源码: https://github.com/infinilabs/analysis-ik.git

1. 解压ik分词器

注:ik分词器要解压到elasticsearch-7.14.0的plugins目录中。解压后,重启es没问题,表示安装成功,验证可以看第7条(安装和验证ik分词器)

  • 首先进入elasticsearch-7.14.0的plugins目录,创建ik目录
  • 将elasticsearch-analysis-ik-7.16.1.zip移动到ik目录下:
[root@localhost ik]# cd /usr/local/soft/es7.14/elasticsearch-7.14/plugins
[root@localhost ik]# mkdir ik
[root@localhost ik]# unzip elasticsearch-analysis-ik-7.16.1.zip[root@localhost ik]# chown -R es:es  /usr/local/soft/es7.14/elasticsearch-7.14

2. 重新启动ES

ik分词器版本 7.16.1

启动报错:
uncaught exception in thread [main]
java.lang.IllegalArgumentException: Plugin [analysis-ik] was built for Elasticsearch version 7.16.1 but version 7.14.0 is running

在这里插入图片描述

解决方法
在改分词器文件夹下找到plugin-descriptor.properties

elasticsearch.version=改成你当前服务器es的版本

在这里插入图片描述
在这里插入图片描述

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • React的生命周期方法以及React 18之后的变化
  • 时序预测|基于贝叶斯BO-卷积-双向门控单元-注意力机制的单变量时间序列预测模型BO-CNN-BiGRU-Attention
  • SMF05C.TCT TVS二极管阵列用于ESD和锁定保护芯片IC
  • github源码指引:C++嵌入式WEB服务器
  • JAVA面试题--ES
  • 切面条(蓝桥杯-基础)
  • 【通信协议】SPI总线
  • JVM - 1.类加载子系统
  • 工业相机错峰启动优化方案
  • 【最长公共子序列】
  • 程序员的日常挑战:如何在编码工作与持续学习之间找到平衡?
  • 电子克隆方法的优缺点有哪些?
  • 计数排序算法及优化(java)
  • 搜狐新闻HarmonyOS Push开发实践
  • 火绒安全:一款强大且高效的国产杀毒软件
  • [译]如何构建服务器端web组件,为何要构建?
  • 【Amaple教程】5. 插件
  • avalon2.2的VM生成过程
  • create-react-app项目添加less配置
  • iOS 系统授权开发
  • js正则,这点儿就够用了
  • PAT A1120
  • PermissionScope Swift4 兼容问题
  • PHP变量
  • Promise面试题2实现异步串行执行
  • puppeteer stop redirect 的正确姿势及 net::ERR_FAILED 的解决
  • python 装饰器(一)
  • React as a UI Runtime(五、列表)
  • use Google search engine
  • Vue实战(四)登录/注册页的实现
  • Vue--数据传输
  • 不上全站https的网站你们就等着被恶心死吧
  • 从0到1:PostCSS 插件开发最佳实践
  • 对象引论
  • 判断客户端类型,Android,iOS,PC
  • 使用Swoole加速Laravel(正式环境中)
  • 微服务框架lagom
  • 小试R空间处理新库sf
  • 学习ES6 变量的解构赋值
  • ‌前端列表展示1000条大量数据时,后端通常需要进行一定的处理。‌
  • #{}和${}的区别?
  • #if 1...#endif
  • #NOIP 2014# day.1 生活大爆炸版 石头剪刀布
  • #pragma once与条件编译
  • #vue3 实现前端下载excel文件模板功能
  • #我与Java虚拟机的故事#连载13:有这本书就够了
  • (003)SlickEdit Unity的补全
  • (1)(1.8) MSP(MultiWii 串行协议)(4.1 版)
  • (19)夹钳(用于送货)
  • (day 12)JavaScript学习笔记(数组3)
  • (LNMP) How To Install Linux, nginx, MySQL, PHP
  • (react踩过的坑)antd 如何同时获取一个select 的value和 label值
  • (STM32笔记)九、RCC时钟树与时钟 第二部分
  • (二十九)STL map容器(映射)与STL pair容器(值对)
  • (官网安装) 基于CentOS 7安装MangoDB和MangoDB Shell