首页 > 技术文章 > windows10 使用elasticsearch和kibana

zhian 2020-05-12 14:29 原文

https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-windows-x86_64.zip  

https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.4.0/elasticsearch-analysis-ik-7.4.0.zip

https://artifacts.elastic.co/downloads/kibana/kibana-7.6.2-windows-x86_64.zip

放到迅雷里面下载

解压elasticsearch-7.6.2-windows-x86_64.zip  

修改 elasticsearch-7.6.2->config->elasticsearch.yml

启动配置->http.port: 9200

elasticsearch-analysis-ik-7.4.0.zip  解压放到 elasticsearch-7.6.2-windows-x86_64 ->plugins->analysis-ik(需要自己创建)

修改plugin-descriptor.properties的配置

# Elasticsearch plugin descriptor file
# This file must exist as 'plugin-descriptor.properties' at
# the root directory of all plugins.
#
# A plugin can be 'site', 'jvm', or both.
#
### example site plugin for "foo":
#
# foo.zip <-- zip file for the plugin, with this structure:
#   _site/ <-- the contents that will be served
#   plugin-descriptor.properties <-- example contents below:
#
# site=true
# description=My cool plugin
# version=1.0
#
### example jvm plugin for "foo"
#
# foo.zip <-- zip file for the plugin, with this structure:
#   <arbitrary name1>.jar <-- classes, resources, dependencies
#   <arbitrary nameN>.jar <-- any number of jars
#   plugin-descriptor.properties <-- example contents below:
#
# jvm=true
# classname=foo.bar.BazPlugin
# description=My cool plugin
# version=2.0.0-rc1
# elasticsearch.version=2.0
# java.version=1.7
#
### mandatory elements for all plugins:
#
# 'description': simple summary of the plugin
description=IK Analyzer for Elasticsearch
#
# 'version': plugin's version
version=7.4.0
#
# 'name': the plugin name
name=analysis-ik
#
# 'classname': the name of the class to load, fully-qualified.
classname=org.elasticsearch.plugin.analysis.ik.AnalysisIkPlugin
#
# 'java.version' version of java the code is built against
# use the system property java.specification.version
# version string must be a sequence of nonnegative decimal integers
# separated by "."'s and may have leading zeros
java.version=1.8
#
# 'elasticsearch.version' version of elasticsearch compiled against
# You will have to release a new version of the plugin for each new
# elasticsearch release. This version is checked when the plugin
# is loaded so Elasticsearch will refuse to start in the presence of
# plugins with the incorrect elasticsearch.version.
elasticsearch.version=7.6.2

用cmd 命令cd 到elasticsearch-7.6.2\bin  ,然后用elasticsearch 启动,系统需要安装JDK1.8 并且在环境变量里面配置

用浏览器打开http://localhost:9200/  就可显示

{
  "name" : "计算机名称",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "_E0pVzguSgeSE0y7huYsjg",
  "version" : {
    "number" : "7.6.2",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "ef48eb35cf30adf4db14086e8aabd07ef6fb113f",
    "build_date" : "2020-03-26T06:34:37.794943Z",
    "build_snapshot" : false,
    "lucene_version" : "8.4.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

解压kibana-7.6.2-windows-x86_64.zip ,

kibana-7.6.2-windows-x86_64——》config-》kibana.yml

开启

server.port: 5601

elasticsearch.hosts: ["http://localhost:9200"]

然后cmd 命令cd 到kibana-7.6.2-windows-x86_64\bin  ,然后用kibana 启动

浏览器浏览http://localhost:5601/

推荐阅读