Elasticsearch许可证更新

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

1.注册elasticsearch账号,注册地址 https://register.elastic.co/
根据你填写的邮箱,会收到一封邮件
Elasticsearch许可证更新_第1张图片

Elasticsearch许可证更新_第2张图片

对于linux系统 执行下列命令

curl -XPUT -u  'http://:/_xpack/license' -H "Content-Type: application/json" -d @license.json

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

gc .\license.json |  Invoke-WebRequest -uri http://:/_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


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

注意这里url加上了 acknowledge=true,否则会报错
Elasticsearch许可证更新_第3张图片
如果成功,就会弹框 要求 输入 elastic ,默认密码 为 changeme

你可能感兴趣的:(ES)