下载安装
elasticsearch下载链接
运行:bin\elasticsearch.bat
设置密码:.\bin\elasticsearch-setup-passwords interactive
这边设置密码遇到一个坑
PS G:\elasticsearch-8.8.1> .\bin\elasticsearch-setup-passwords interactive
Failed to authenticate user 'elastic' against https://172.26.192.1:9200/_security/_authenticate?pretty
Possible causes include:
* The password for the 'elastic' user has already been changed on this cluster
* Your elasticsearch node is running against a different keystore
This tool used the keystore at G:\elasticsearch-8.8.1\config\elasticsearch.keystore
You can use the `elasticsearch-reset-password` CLI tool to reset the password of the 'elastic' user
ERROR: Failed to verify bootstrap password
解决方式:
.\elasticsearch-reset-password -u elastic
PS G:\elasticsearch-8.8.1\bin> .\elasticsearch-reset-password -u elastic
This tool will reset the password of the [elastic] user to an autogenerated value.
The password will be printed in the console.
Please confirm that you would like to continue [y/N]y
Password for the [elastic] user successfully reset.
New value: -qL4U9Bun6uJQp9xV1Ih
自定义密码:elasticsearch-reset-password -u elastic -i
Authorization: Basic TOKEN
TOKEN是 base64 账号:密码
这就算安装成功了