Overview
Detailed explanation of the use of the log system ELK (1) – How to use the
log system ELK detailed explanation (two) – Logstash installation and use of the
log system Detailed Explanation of ELK Use (5) – Supplement
Immediately after the previous article, in this article, we started to install es. Here we use the es5.3.0 version, which can be downloaded from the official website: https://www.elastic.co/cn/downloads .
Versions after 5.0 and previous versions have some differences in installing the head plug-in. The previous version is very easy to install the head plug-in, just run
elasticsearch/bin/plugin -install mobz/elasticsearch-head
- 1
That's it, but after 5.0, the head plugin is replaced by the grunt service mode, which needs to be packaged and installed in npm mode, which is a little more complicated.
Next, let's take a look at the installation of es and head.
Install elasticsearch
1. Download elasticsearch;
2. Unzip;
3. Modify /elasticsearch-5.3.0/config/elasticsearch.yml
to open:
network.host: 127.0.0.1
http.port: 9200
- 1
- 2
Increase:
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
- 1
- 2
These two configurations support cross-domain access, so that the head plug-in and kibana installed later can access the query interface of es normally.
Most of the online tutorials are the installation instructions of the old version, so it is possible that you will encounter some configuration items that cannot be used. If you encounter it, you only need to follow the prompt information when es starts, or remove or modify it.
4. Start the es service
/elasticsearch-5.3.0/bin/elasticsearch -d #表示以daemon的方式启动,命令行输入输出不被占用
- 1
5. You can test es through the http interface of es, or you can test in the head after the next head plug-in is installed.
Install the head plugin
1. Install nodejs
2. Install grunt-cli
3. Download and install the head plugin
Here are just simple steps. For the specific installation process, please refer to the following blog: http://www.cnblogs.com/xiaofei1205/p/6704239.html The author talks in detail, and will not be repeated here.
One of the differences is that during the installation process, an exception that is different from that of the author above is encountered, which is the exception of ""license": "Apache2"", indicating that it needs to be changed to BSD authorization.
See this blog for the modification method: http://blog.csdn.net/u010504064/article/details/53312093
Here is a screenshot of the head:
####################################
Reprinted from: https://blog.csdn.net/buqutianya/article/details/72026768