Elasticsearch 8.8.1安装及启动

华为云的镜像去下载

ElasticSearch: https://mirrors.huaweicloud.com/elasticsearch/?C=N&O=D
logstash: https://mirrors.huaweicloud.com/logstash/?C=N&O=D
kibana: https://mirrors.huaweicloud.com/kibana/?C=N&O=D

原文链接:https://blog.csdn.net/Rok728/article/details/121953545

链接地址

https://repo.huaweicloud.com/elasticsearch/8.8.1/elasticsearch-8.8.1-linux-x86_64.tar.gz
https://repo.huaweicloud.com/kibana/8.8.1/kibana-8.8.1-linux-x86_64.tar.gz

创建用户

elasticsearch 为了安全性,不能使用root账号启动,需切换其他账号,或新建账号来启动。
我们这里新建一个账号 elastic,执行命令useradd elastic,授权chown -R elastic:elastic /soft/elasticsearch-8.8.1
修改配置文件
到/soft/elasticsearch-8.8.1/config目录下修改elasticsearch.yml 文件如下,使外网也能访问elasticsearch

下面启动报错问题参考

https://blog.csdn.net/Rok728/article/details/121953545

启动无法访问

原因:ES8默认开启了 ssl 认证
解决:修改elasticsearch.yml配置文件:
xpack.security.http.ssl:enabled 设置成 false
xpack.security.enabled 设置成false

关键代码 vim …/config/elasticsearch.yml

network.host: 0.0.0.0
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
xpack.security.enabled: false

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["VM-4-12-centos"]

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41638872/article/details/131651868