ElasticSearch, ES-head, Kibana latest version installation tutorial


This article is an installation tutorial under Windows, the next installation process has some needs Node.jsand npmsupport

So it needs to be installed Node.jsin advance , now it Node.jsintegrates its package managernpm

You can enter the following command in cmd to see if it is installed node.jsandnpm

node -v
npm -v

image-20200914201125441


Installation of ElasticSearch

1. Download es

Official website : https://www.elastic.co/cn/elasticsearch/

image-20200914105035574
Then click download to enter the download page, and then click the corresponding system to download

Download page : https://www.elastic.co/cn/downloads/elasticsearch
image-20200914105201408

ps : The speed is very slow under the official website, it is recommended to copy the download link and go to Thunder download
image-20200914105530442

2. Unzip the es compressed package

Unzip and use

image-20200914105904652

3. Understand the es directory

bin: Startup file

config: Configuration file
image-20200914110607882
lib: related jar package (you can see a lot of about lucene)

logs: Log

modules:functional module

plugins: Plug-in (such as ik tokenizer, can be used in this directory)

4. Start es

Double-click to elasticsearch.batstart under the bin directory
image-20200914111328138
image-20200914120333920

5. Access test

After starting, find the access address in the picture above

access127.0.0.1:9200
image-20200914120422823

At this point, success




ElasticSearch-head installation

1. Download es-head

Download link : https://github.com/mobz/elasticsearch-head
image-20200914121432597
image-20200914121454979

2. Unzip the es-head compressed package

Unzip after downloading
image-20200914190058634

3. Download es-head related dependencies

Note: The next operation needs to be installed in advanceNode.js

Then open cmd, switch to the current directory, enter the following command to install related dependencies

cnpm install

image-20200914190605226
Wait for the installation to complete, and then re-check our installation directory, you can see the dependency folder of the installation
image-20200914190716364

4. Start es-head

After the dependency installation is complete, enter the following command to start

npm run start

image-20200914191215836
When the above result appears, the startup is successful

4. Access test, connect to es

Then access localhost:9100, the following interface appears.
image-20200914191302286
Then we clicked on the connection and found that there was no response, F12opened the console, checked the information, and found that an error was reported.
image-20200914192207570
This is because 跨域问题: here we connect port 9100 to port 9200, and there is a problem across ports

5. Solve cross-domain issues

Next, you need elasticsearch.ymlto make the relevant settings in the elasticsearch configuration file , first close the elseticsearch

The configuration file path in elasticsearch is:elasticsearch安装目录\config\elasticsearch.yml

elasticsearch.ymlAdd the following two lines of code at the end

http.cors.enabled: true
http.cors.allow-origin: "*"

image-20200914192831567
Save and exit, then restart elasticsearch(click in the bin directory elasticsearch.bat)

After the startup is successful, localhost:9200check whether the access is successful
image-20200914193005547
and then localhost:9100click Connect again , success!
image-20200914193049332

At this point, es-head is installed successfully and successfully connected to es




Kibana installation

KibanaIt is an elasticsearchopen source analysis and visualization platform for searching and viewing interactive data stored in the Elasticsearchindex.

  • Use Kibanaadvanced data analysis and display through various charts
  • KibanaMake huge amounts of data easier to understand. It is easy to operate, and the browser-based user interface can quickly create a dashboard (dashboard) to display Elasticsearchquery dynamics in real time
    • The setup Kibanais very simple. No coding or additional infrastructure is required, the Kibanainstallation can be completed and Elasticsearchindex monitoring can be started within a few minutes .

1. Download kibana

Official website : https://www.elastic.co/cn/kibana/

Click download on the official website to jump to the download page

image-20200914195819102

Download page: https://www.elastic.co/cn/downloads/kibana

Then click on the corresponding system to download
image-20200914200008032
ps: the speed is very slow under the official website, it is recommended to copy the download link and go to Thunder download

2. Unzip the kibana compressed package

After the download is complete, unzip it, it will take a certain amount of time to unzip, and the unzip is complete

3. Dynamic kibana

Double-click to kibana.batstart under the bin directory
image-20200914201559218
1

4. Access test

As shown in the figure above, the default port of kibana is 5601, access localhost:5601for testing, the following page appears
image-20200914202909804

5. Sinicization

Modify the kibana configuration file kibana.yml, address: kibana安装目录\config\kibana.yml
image-20200914203757371
add at the end, i18n.locale: "zh-CN"
image-20200914203827536
save and exit, and then restart kibana, you can see that it has all become Chinese
image-20200914204552245

Guess you like

Origin blog.csdn.net/qq_45173404/article/details/108588686