1. 首先查看license的有效时间是多少
es默认用户elastic 密码changeme
curl -u elastic -XGET 'http://ip:9200/_xpack/license'
2. 登录进行注册
https://register.elastic.co/xpack_register
3. 后面主要执行两步来进行许可证的导入
(1)向 API 发送请求license并指定包含新许可证的文件:
curl -u elastic -XPUT 'http://ip:9200/_xpack/license' -H "Content-Type: application/json" -d @-lcc23d4-f3ss-35a2-259a-68753as093sdf4-v5.json
(2)提交许可证更新请求并将acknowledge参数设置true:
curl -u elastic -XPUT 'http://ip:9200/_xpack/license?acknowledge=true' -H "Content-Type: application/json" -d @-lcc23d4-f3ss-35a2-259a-68753as093sdf4-v5.json
导入后继续观察下时间是否进行变动!