首页 > 其他 > 详细

ES证书到期,修改证书期限的办法

时间:2021-03-12 10:31:06      阅读:101      评论:0      收藏:0      [点我收藏+]

前言

ES下载安装后有一个月试用期,到期后需要更新License,且每个License有效期为 1 年,License过期前10天里相关log会一直出现,提醒用户更新,支持实时更新无需重启服务。

查看节点状态:

curl -XGET -u username:password ‘http://localhost:9200/_cat/nodes‘

查看集群状态:

curl -XGET -u username:password ‘http://localhost:9200/_cluster/health?pretty=true‘

检查证书是否到期:

curl -XGET -u username:password ‘http://localhost:9200/_xpack/license‘

如果已过期,去https://register.elastic.co/registration 网址上注册一个,成功后ELK会向注册邮箱发送邮件,然后去邮箱链接下载你的License。

将刚才下载下来的license.json文件上传至es集群机器

签发证书:

curl -XPUT -u username:password http://localhost:9200/_xpack/license?acknowledge=true -H "Content-Type: application/json" -d @license.json
或者:
curl -XPUT -u username:password "http://ip:port/_xpack/license" -d @license.json

将证书期限修改为50年的方法:

下载下来的证书也只有一年的有效期,一年后又要更新。为此,我们尝试将有效期延长,修改 License.json 文件中的一下字段:

1、将 "type":"basic" 替换为 "type":"platinum" (基础版变更为铂金版)
2、将 "expiry_date_in_millis":1561420799999 替换为 "expiry_date_in_millis":3107746200000(1年变为50年)

修改完记得执行命令重新生成一下哦~~

ES证书到期,修改证书期限的办法

原文:https://www.cnblogs.com/mmzl/p/14522070.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!