ES7.4.0依赖

ES7.4.0依赖

        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-high-level-client</artifactId>
            <version>7.4.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.elasticsearch</groupId>
                    <artifactId>elasticsearch</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.elasticsearch.client</groupId>
                    <artifactId>elasticsearch-rest-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch.client</groupId>
            <artifactId>elasticsearch-rest-client</artifactId>
            <version>7.4.0</version>
        </dependency>
        <dependency>
            <groupId>org.elasticsearch</groupId>
            <artifactId>elasticsearch</artifactId>
            <version>7.4.0</version>
        </dependency>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Elasticsearch是一种流行的开源搜索和分析引擎,通常用于大规模数据的搜索和分析。要设置Elasticsearch 7.4.0集群并设置密码,需要执行以下步骤: 1. 首先,在每个节点上安装Elasticsearch,并确保它们都运行。 如果所有节点都在同一局域网内,则它们应该可以相互看到和通信。 2. 然后,在集群的任何一个节点上,使用curl命令来设置初始密码。 示例命令如下: curl -XPOST -u elastic 'localhost:9200/_security/user/elastic/_password?pretty' -H 'Content-Type: application/json' -d' { "password": "new-password" } ' 3. 接下来,编辑每个节点的elasticsearch.yml文件,以指定初始密码,并在所有节点上使用相同的密码。 示例配置如下: xpack.security.enabled: true xpack.security.authc.api_key.enabled: true xpack.security.transport.ssl.enabled: true xpack.security.transport.ssl.verification_mode: certificate xpack.security.http.ssl.enabled: true xpack.security.http.ssl.verification_mode: certificate xpack.security.authc.realms.native.native1.order: 0 xpack.security.authc.realms.native.native1.enabled: true xpack.security.authc.realms.native.native1.users: elastic: password: "new-password" roles: ["superuser"] 4. 最后,重启所有Elasticsearch节点,以使配置生效。可以使用curl命令测试是否设置了密码,示例命令如下: curl -u elastic -XGET 'localhost:9200/_cluster/health?pretty' 以上是设置Elasticsearch 7.4.0集群并设置密码的大致步骤。要注意的是,本文仅提供了一种方法,并且可能不适用于所有情况。在实现任何更改之前,请仔细阅读Elasticsearch文档,并在测试环境中进行测试。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值