下载xpack6.2.2.zip文件,将x-pack-core-6.2.2.jar文件放置在elasticsearch的安装目录下的elasticsearch-6.2.2\plugins\x-pack\x-pack-core下替换原来的x-pack-core-6.2.2.jar文件。然后参考https://www.elastic.co/guide/en/elasticsearch/reference/6.2/update-license.html这个地址的api去更新license。即可