elasticsearch下载地址:https://www.elastic.co/cn/downloads/past-releases#elasticsearch
因为elasticsearch是java开发的,所以依赖jdk,elasticsearch7.x及之前的版本使用jdk8,elasticsearch7.x之后的版本都自带jdk,无需安装。
rpm -i elasticsearch-8.4.3-x86_64.rpm
安装后打印日志如下
警告:elasticsearch-8.4.3-x86_64.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID d88e42b4: NOKEY
Creating elasticsearch group... OK
Creating elasticsearch user... OK
--------------------------- Security autoconfiguration information ------------------------------
Authentication and authorization are enabled.
TLS for the transport and HTTP layers is enabled and configured.
The generated password for the elastic built-in superuser is : idyUB6RlAvsWDs=Mx98E
If this node should join an existing cluster, you can reconfigure this with
'/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token '
after creating an enrollment token on your existing cluster.
You can complete the following actions at any time:
Reset the password of the elastic built-in superuser with
'/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic'.
Generate an enrollment token for Kibana instances with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana'.
Generate an enrollment token for Elasticsearch nodes with
'/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s node'.
-------------------------------------------------------------------------------------------------
### NOT starting on installation, please execute the following statements to configure elasticsearch service to start automatically using systemd
sudo systemctl daemon-reload
sudo systemctl enable elasticsearch.service
### You can start elasticsearch service by executing
sudo systemctl start elasticsearch.service
为什么要把日志列出来往下看
systemctl start elasticsearch.service #启动elasticsearch
systemctl stop elasticsearch.service #停止elasticsearch
https://192.168.236.129:9200/
需要登陆的账号密码,在哪?
回头看打印日志
The generated password for the elastic built-in superuser is : idyUB6RlAvsWDs=Mx98E
密码就在最后,但是密码太长记不住,换个密码怎么处理?
看日志
/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic #由系统重置密码
/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic -i #手工指定elastic的新密码
再次登陆输入账号密码即可
elasticsearch安装文件路径
官方安装文档:https://www.elastic.co/guide/en/elasticsearch/reference/8.4/rpm.html#_use_the_ca_certificate_4