elasticsearch-7.17.4 基础班升级到白金版本

一、ES证书申请

Register | Elastichttps://license.elastic.co/registration

  • 邮箱下载授权文件是一个json格式 ,修改json文件的属性,basic 基础版本,platinum 白金版本,时间戳自行修改,年限自定义

  • "type":"basic" 替换为 "type":"platinum"  

  • "expiry_date_in_millis":"1765556390000" 

二、ES证书类型对比

订阅 | Elastic Stack 产品和支持 | Elastic查看 Elastic Stack(Elasticsearch、Kibana、Beats 和 Logstash)就地部署、Elastic Cloud 和 Elastic Cloud Enterprise 的订阅级别、定价和分级功能。https://www.elastic.co/cn/subscriptions

三、使用授权,进入到json 所在的文件目录,执行以下命令

curl -XPOST -u elastic "http://127.0.0.1:9200/_xpack/license?acknowledge=true" -H "Content-Type: application/json" -d @xxxx.json
Enter host password for user 'elastic':
{"acknowledged":true,"license_status":"invalid"}

四、 修改用户密码

E:\elasticsearch-7.17.4-windows-x86_64\elasticsearch-7.17.4\bin>elasticsearch-setup-passwords interactive
"warning: usage of JAVA_HOME is deprecated, use ES_JAVA_HOME"
Future versions of Elasticsearch will require Java 11; your Java version from [C:\Program Files\Java\jdk1.8.0_181\jre] does not meet this requirement. Consider switching to a distribution of Elasticsearch with a bundled JDK. If you are already using a distribution with a bundled JDK, ensure the JAVA_HOME environment variable is not set.
Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
You will be prompted to enter passwords as the process progresses.
Please confirm that you would like to continue [y/N]y


Enter password for [elastic]:
Reenter password for [elastic]:
Enter password for [apm_system]:
Reenter password for [apm_system]:
Enter password for [kibana_system]:
Reenter password for [kibana_system]:
Enter password for [logstash_system]:
Reenter password for [logstash_system]:
Enter password for [beats_system]:
Reenter password for [beats_system]:
Enter password for [remote_monitoring_user]:
Reenter password for [remote_monitoring_user]:
Changed password for user [apm_system]
Changed password for user [kibana_system]
Changed password for user [kibana]
Changed password for user [logstash_system]
Changed password for user [beats_system]
Changed password for user [remote_monitoring_user]
Changed password for user [elastic]

五、替换jar包

联系博主,取铂金版jar包

六、修改spingboot的配置文件

spring:
  data:
    elasticsearch:
      repositories:
        enabled: true
      rest:
        uris: localhost:9200
        username: elastic
        password: xxxx

这种方式在没有开启安全策略以后,会一直报错,401 ES status line [HTTP/1.1 401 Unauthorized]];

需要调整配置文件

spring:
  elasticsearch:
    password: xxx
    username: elastic
    uris: [localhost:9200]
curl -XPUT http://elastic:cfl,1997@127.0.0.1:9200/syslog/_settings -d "{\"number_of_replicas\": 0}" -H "Content-Type: application/json"

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Elasticsearch 7.17.4的安装步骤如下: 1. 下载Elasticsearch 在官网 https://www.elastic.co/cn/downloads/elasticsearch 下载Elasticsearch的压缩包,选择适合自己操作系统的版本。下载完成后解压到任意目录。 2. 修改配置文件 进入Elasticsearch的config目录,修改elasticsearch.yml文件。比如: ``` # 设置集群名称 cluster.name: my-cluster # 设置节点名称 node.name: my-node # 设置数据存储路径 path.data: /path/to/data # 设置日志文件路径 path.logs: /path/to/logs ``` 3. 启动Elasticsearch 在终端中进入Elasticsearch的bin目录,执行以下命令启动Elasticsearch: ``` ./elasticsearch ``` 如果一切顺利,你应该能看到类似以下的输出: ``` [2022-02-24T11:23:10,394][INFO ][o.e.n.Node ] [my-node] version[7.17.4], pid[12345], build[default/tar/123abc/2022-01-25T17:34:29.218660Z], OS[Linux/4.14.143-89.123.amzn1.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/16.0.2/16.0.2+7] [2022-02-24T11:23:10,396][INFO ][o.e.n.Node ] [my-node] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseG1GC, -XX:G1ReservePercent=25, -XX:InitiatingHeapOccupancyPercent=30, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms512m, -Xmx512m, -Des.path.home=/path/to/elasticsearch-7.17.4, -Des.path.conf=/path/to/elasticsearch-7.17.4/config, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=true] [2022-02-24T11:23:19,999][INFO ][o.e.p.PluginsService ] [my-node] loaded module [aggs-matrix-stats] [2022-02-24T11:23:19,999][INFO ][o.e.p.PluginsService ] [my-node] loaded module [analysis-common] [2022-02-24T11:23:19,999][INFO ][o.e.p.PluginsService ] [my-node] loaded module [geo] [2022-02-24T11:23:19,999][INFO ][o.e.p.PluginsService ] [my-node] loaded module [ingest-common] ... [2022-02-24T11:23:20,000][INFO ][o.e.p.PluginsService ] [my-node] loaded module [transport-netty4] [2022-02-24T11:23:20,000][INFO ][o.e.p.PluginsService ] [my-node] no plugins loaded [2022-02-24T11:23:23,123][INFO ][o.e.x.s.a.s.FileRolesStore] [my-node] parsed [0] roles from file [/path/to/elasticsearch-7.17.4/config/roles.yml] [2022-02-24T11:23:24,456][INFO ][o.e.i.g.GatewayService ] [my-node] recovered [0] indices into cluster_state [2022-02-24T11:23:27,521][INFO ][o.e.c.r.a.AllocationService] [my-node] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[my-index][0]]]). ``` 这表示Elasticsearch已经成功启动。你可以通过访问`http://localhost:9200`来验证Elasticsearch是否运行正常。 4. 安装插件 Elasticsearch提供了很多插件,可以根据自己的需求进行安装。比如,安装kopf插件: ``` ./bin/elasticsearch-plugin install lmenezes/elasticsearch-kopf/2.1.2 ``` 5. 配置Elasticsearch作为服务 如果你想将Elasticsearch作为服务在后台运行,可以参考官方文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/starting-elasticsearch.html。 希望这个安装教程能够帮助到你。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值