Install elasticsearch and kibana in windows environment

Insert image description here

Through this article, you can quickly install elasticsearch and kibana environments on Windows systems.

When you use the Integer type, be very careful, because 100 is equal to 100, but 200 is not equal to 200. Of course, if you know a little trick, you can also make 100 not equal to 100 and make 200 equal to 200. (The == operator compares whether the references of objects are equal, not whether the values ​​are equal. The equals method is used for wrapper type comparison operations)


1. Install JDK


Elasticsearch is developed based on Lucene, and JDK needs to be installed before running Elasticsearch. For ES 5.x and higher, it depends on the 1.8 or higher JDK.

If JDK8 or higher is already installed on your computer, there is no need to continue installing JDK, just skip this step. Check the version through the java -version command.

image-20230803160405001


2. Download ES


elk historical version download address: https://www.elastic.co/cn/downloads/past-releases/

ES green version download address: https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.7.1-windows-x86_64.zip

image-20230803165934307

image-20230803165427997

image-20230803160631306


3. Unzip the ES installation package


The decompressed es directory structure is as follows:

image-20230803160914177


4. Modify the ES service port


es default port is 9200.

Enter the config directory and add the following configuration to the elasticsearch.yml file:

image-20230803163012339

http.port: 9201

image-20230803162916330


5. Start ES


Enter the bin directory and double-click to execute the elasticsearch.bat file to start es.

image-20230803162236167

image-20230803163541777

As shown in the picture above, it means that es is started successfully.


6. Verify whether ES starts successfully


The 9201 here is our modified port number, and the default port of ES is 9200.

Browser access: http://localhost:9201/

image-20230803164039666

If you need to modify the es cluster name: Just add it to the elasticsearch.yml file in the config directory cluster.name= xxx.

image-20230803165251262


7. Download Kibana


Kibana download address: https://artifacts.elastic.co/downloads/kibana/kibana-7.7.1-windows-x86_64.zip

image-20230803170439641


8. Unzip the Kibana installation package


The unzipped kibana directory structure is as follows:

image-20230803171006546


9. Modify the ES configuration in Kibana


Enter the config directory and add the es server address in kibana.yml. (If you have not touched the es port before, you can modify the kibana configuration and omit it)

image-20230803171820837

The modifications are as follows:

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

image-20230803171315968


10. Start Kibana


Double-click the kibana.bat file in the bin directory.

image-20230803171842615

image-20230803172016551


11. Enter Kibana’s DevTools interface to operate ES


Browser access: http://localhost:5601/

image-20230803172328348

test:

image-20230803174355710

Guess you like

Origin blog.csdn.net/qq_46921028/article/details/132089029