ElasticSearch 下载
https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.1.3-windows-x86_64.zip
编辑:elasticsearch.yml:
http.port: 9200 xpack.security.enabled: true xpack.security.enrollment.enabled: true xpack.security.http.ssl: #默认ture,改成false enabled: false keystore.path: certs/http.p12 xpack.security.transport.ssl: enabled: true verification_mode: certificate keystore.path: certs/transport.p12 truststore.path: certs/transport.p12 cluster.initial_master_nodes: ["MACHENI-V5Q18GP"] http.host: [_local_, _site_]
启动,默认给 elastic 用户分配一个密码 LYmLB99IOWwMm3rZbm8m,可以通过以下命令重置密码:
bin/elasticsearch-reset-password -u elastic
部分启动日志:
--------------------------------------------------------------------------
-> 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`):
LYmLB99IOWwMm3rZbm8m
-> HTTP CA certificate SHA-256 fingerprint:
a937496a7fae0c87c4970fdbde642ff28e45e7c0a139bbf280cbb785c804b743
-> 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):
eyJ2ZXIiOiI4LjEuMyIsImFkciI6WyIxOTIuMTY4LjIuNzo5MjAwIl0sImZnciI6ImE5Mzc0OTZhN2ZhZTBjODdjNDk3MGZkYmRlNjQyZmYyOGU0NWU3YzBhMTM5YmJmMjgwY2JiNzg1YzgwNGI3NDMiLCJrZXkiOiJ1a28yTG9JQkp4ZDZxZ195Y095MzoySHBVTmhpV1NPU1ZwZWFLSjVPSFNRIn0=
-> 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 <token>`, using the enrollment token that you generated.
如下代表安装OK:
Kibana 下载:
https://artifacts.elastic.co/downloads/kibana/kibana-8.1.3-windows-x86_64.zip
先设置 kibana_system用户的密码,kibana 连接 Es 需要使用(在Es安装包里执行)
bin/elasticsearch-reset-password -u kibana_system
kibana.yml
server.port: 5601 server.host: "localhost" server.name: "kill-kibana" elasticsearch.hosts: ["http://localhost:9200"] elasticsearch.username: "kibana_system" elasticsearch.password: "HLJx-JpiQgzOQjK1YkmU" #默认为 true,这里改成none elasticsearch.ssl.verificationMode: none i18n.locale: "zh-CN"
用ElasticSearch的用户名和密码登录即可: 我这里是 elastic/LYmLB99IOWwMm3rZbm8m