• Elasticsearch7.17.6单点部署


    以下我们在Centos7操作系统上以Elasticsearch7.17.6为例来进行一下安装

    环境准备

    Elasticsearch https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.6-linux-x86_64.tar.gz
    其它包格式:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-17-6

    开始安装

    1. 解压

    2. 修改elasticsearch.yml

    cluster.name: TestEs
    node.name: node01
    path.data: /data/es7/data
    path.logs: /data/es7/logs
    network.host: 192.168.5.112
    http.port: 9200
    cluster.initial_master_nodes: ["node01"]
    http.max_initial_line_length: 64kb
    # 下面这段配置后续在配也行,因为得先生成证书才能配置证书绝对路径
    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    xpack.security.transport.ssl.verification_mode: certificate
    xpack.security.transport.ssl.keystore.path: /opt/app/elasticsearch-7.17.6/config/elastic-certificates.p12
    xpack.security.transport.ssl.truststore.path: /opt/app/elasticsearch-7.17.6/config/elastic-certificates.p12
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    1. 进入到elasticsearch解压目录执行生成CA证书命令bin/elasticsearch-certutil ca 一路回车即可,成功后会在解压目录下生成elastic-stack-ca.p12文件

    2. 根据上述产生的CA证书来生成对应的密钥,执行命令bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12,一路回车即可,成功后会在解压目录下生成elastic-certificates.p12秘钥文件

    3. 将elastic-certificates.p12移动到config目录下

    4. 如果没有添加elasticsearch.yml末尾的配置,那么此时可以添加

    5. chown -R bigdata.bigdata es解压目录

    6. 启动bin/elasticsearch -d

    7. 设置密码bin/elasticsearch-setup-passwords interactive

    问题

    access denied (“java.io.FilePermission“ “/cert/elastic-certificates.p12“ “read“)

    将elastic-certificates.p12移动到config目录下

  • 相关阅读:
    多线程的相关知识
    服务器正文18:UDP可靠传输的理解和思考(读云凤博客有感)
    葛姓取名女孩儒雅大气
    PMP每日一练 | 考试不迷路-9.21(包含敏捷+多选)
    继承 Inheritance
    SQL中的非重复计数(进阶)
    Data Analysis With Python
    第十节:继承【java】
    初识html
    @RequestBody、 @RequestParam 、 @PathVariable 和 @Vaild 注解
  • 原文地址:https://blog.csdn.net/m0_59492087/article/details/127682896