table of Contents
This article is an installation tutorial under Windows, the next installation process has some needs
Node.js
andnpm
support
So it needs to be installed Node.js
in advance , now it Node.js
integrates its package managernpm
You can enter the following command in cmd to see if it is installed node.js
andnpm
node -v
npm -v
Installation of ElasticSearch
1. Download es
Official website : https://www.elastic.co/cn/elasticsearch/
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
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 es compressed package
Unzip and use
3. Understand the es directory
bin
: Startup file
config
: Configuration file
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.bat
start under the bin directory
5. Access test
After starting, find the access address in the picture above
access127.0.0.1:9200
At this point, success
ElasticSearch-head installation
1. Download es-head
Download link : https://github.com/mobz/elasticsearch-head
2. Unzip the es-head compressed package
Unzip after downloading
3. Download es-head related dependencies
Note: The next operation needs to be installed in advance
Node.js
Then open cmd
, switch to the current directory, enter the following command to install related dependencies
cnpm install
Wait for the installation to complete, and then re-check our installation directory, you can see the dependency folder of the installation
4. Start es-head
After the dependency installation is complete, enter the following command to start
npm run start
When the above result appears, the startup is successful
4. Access test, connect to es
Then access localhost:9100
, the following interface appears.
Then we clicked on the connection and found that there was no response, F12
opened the console, checked the information, and found that an error was reported.
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.yml
to 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.yml
Add the following two lines of code at the end
http.cors.enabled: true
http.cors.allow-origin: "*"
Save and exit, then restart elasticsearch
(click in the bin directory elasticsearch.bat
)
After the startup is successful, localhost:9200
check whether the access is successful
and then localhost:9100
click Connect again , success!
At this point, es-head is installed successfully and successfully connected to es
Kibana installation
Kibana
It is anelasticsearch
open source analysis and visualization platform for searching and viewing interactive data stored in theElasticsearch
index.
- Use
Kibana
advanced data analysis and display through various charts Kibana
Make 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 displayElasticsearch
query dynamics in real time- The setup
Kibana
is very simple. No coding or additional infrastructure is required, theKibana
installation can be completed andElasticsearch
index monitoring can be started within a few minutes .
- The setup
1. Download kibana
Official website : https://www.elastic.co/cn/kibana/
Click download on the official website to jump to the download page
Download page: https://www.elastic.co/cn/downloads/kibana
Then click on the corresponding system to download
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.bat
start under the bin directory
4. Access test
As shown in the figure above, the default port of kibana is 5601
, access localhost:5601
for testing, the following page appears
5. Sinicization
Modify the kibana configuration file kibana.yml
, address: kibana安装目录\config\kibana.yml
add at the end, i18n.locale: "zh-CN"
save and exit, and then restart kibana
, you can see that it has all become Chinese