https://www.elastic.co/cn/downloads/elasticsearch
双击 elasticsearch.bat 启动 elasticsearch 服务
注:第一次启动时, 要注意此时的 ip 地址, 该 ip 地址会被绑定到 enrollment token 中, 在安装 Kibana 时有用
启动后第一次会显示一些配置信息,包括默认的用户密码 elastic 和 2xcXm+1k+km7nk6flNRN
-> Elasticsearch security features have been automatically configured!
-> Authentication is enabled and cluster connections are encrypted.
-> Password for the elastic user (reset with `bin/elasticsearch-reset-password -u elastic`):
+FOyD9Ihzn*6SHmv9Son
-> HTTP CA certificate SHA-256 fingerprint:
61e0476f0849bb2293d6f83152dea0d94985568f6cadaae80f3eef2c621e5629
-> Configure Kibana to use this cluster:
* Run Kibana and click the configuration link in the terminal when Kibana starts.
* Copy the following enrollment token and paste it into Kibana in your browser (valid for the next 30 minutes):
eyJ2ZXIiOiI4LjMuMyIsImFkciI6WyIxOTIuMTY4LjEuNzo5MjAwIl0sImZnciI6IjYxZTA0NzZmMDg0OWJiMjI5M2Q2ZjgzMTUyZGVhMGQ5NDk4NTU2OGY2Y2FkYWFlODBmM2VlZjJjNjIxZTU2MjkiLCJrZXkiOiJwMWZhUDRNQjBWUGo5SW16NElOQzpoczZoU083LVJnbUh1QUZOc0FCUjVBIn0=
-> Configure other nodes to join this cluster:
* On this node:
- Create an enrollment token with `bin/elasticsearch-create-enrollment-token -s node`.
- Uncomment the transport.host setting at the end of config/elasticsearch.yml.
- Restart Elasticsearch.
* On other nodes:
- Start Elasticsearch with `bin/elasticsearch --enrollment-token `, using the enrollment token that you generated.
https://localhost:9200/
{
"name" : "DESKTOP-CJ5CSRU",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "Jcp_3e7xRI6edD_yHgKpJA",
"version" : {
"number" : "8.3.3",
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "801fed82df74dbe537f89b71b098ccaff88d2c56",
"build_date" : "2022-07-23T19:30:09.227964828Z",
"build_snapshot" : false,
"lucene_version" : "9.2.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
%Elasticsearch_Server%\bin
elasticsearch-service.bat install
elasticsearch-service.bat start
elasticsearch-service.bat stop
elasticsearch-service.bat install
elasticsearch-service.bat remove
elasticsearch-service.bat manager
https://nodejs.org/
我所下载的版本为 v14.0.0,下载过程中记得添加入环境变量, 安装成功后进行验证
npm install -g grunt-cli
https://github.com/mobz/elasticsearch-head
npm install
npm run start
http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: "*"
重启 elasticsearch 和 elasticsearch-head
由于本次安装有默认的用户密码, 则我们请求
http://localhost:9100/?auth_user=elastic&auth_password=+FOyD9Ihzn*6SHmv9Son
https://www.elastic.co/cn/downloads/past-releases#kibana