Elasticsearch许可证更新

主要参考了 Elasticsearch许可证过期导致ES用不了的问题

1.注册elasticsearch账号,注册地址 https://register.elastic.co/
根据你填写的邮箱,会收到一封邮件
在这里插入图片描述

在这里插入图片描述

对于linux系统 执行下列命令

curl -XPUT -u <user> 'http://<host>:<port>/_xpack/license' -H "Content-Type: application/json" -d @license.json

对于windows系统(我的就是window10)

gc .\license.json |  Invoke-WebRequest -uri http://<host>:<port>/_xpack/license -Credential elastic -Method Put -ContentType "application/json"

我的样例,注意这里加上了  ?acknowledge=true,否则会报错
curl -XPUT -u elastic ‘http://127.0.0.1:9200/_xpack/license?acknowledge=true’ -H “Content-Type: application/json” -d @wang-haipeng-efd72514-cf4c-401f-90ea-95c31a21c150-v5.json


<user> is a user ID with the appropriate authority.  这里的替换为 elastic (这里是默认用户) 
<host> is the hostname of the Elasticsearch node (localhost if executing locally)   我的就是127.0.0.1
<port> is the http port (defaults to 9200)  我的是9200
license.json is the license JSON file  (第一步下载的 许可证文件)

注意这里url加上了 acknowledge=true,否则会报错
在这里插入图片描述
如果成功,就会弹框 要求 输入 elastic ,默认密码 为 changeme

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章