您好,登錄后才能下訂單哦!
1、cp /home/elk/elasticsearch-6.3.2/modules/x-pack/x-pack-core/x-pack-core-6.3.2.jar /home/tmp
2、jar -xf /home/tmp/x-pack-core-6.3.2.jar
3、vim LicenseVerifier.java
package org.elasticsearch.license;
import java.nio.; import java.util.;
import java.security.;
import org.elasticsearch.common.xcontent.;
import org.apache.lucene.util.;
import org.elasticsearch.common.io.;
import java.io.*;
public class LicenseVerifier {
public static boolean verifyLicense(final License license, final byte[] encryptedPublicKeyData) {
return true;
}
public static boolean verifyLicense(final License license) {
return true;
}
}
4、vim XPackBuild.java
package org.elasticsearch.xpack.core;
import org.elasticsearch.common.io.;
import java.net.;
import org.elasticsearch.common.;
import java.nio.file.;
import java.io.;
import java.util.jar.;
public class XPackBuild {
public static final XPackBuild CURRENT;
private String shortHash;
private String date;
@SuppressForbidden(reason = "looks up path of xpack.jar directly") static Path getElasticsearchCodebase() {
final URL url = XPackBuild.class.getProtectionDomain().getCodeSource().getLocation();
try { return PathUtils.get(url.toURI()); }
catch (URISyntaxException bogus) {
throw new RuntimeException(bogus); }
}
XPackBuild(final String shortHash, final String date) {
this.shortHash = shortHash;
this.date = date;
}
public String shortHash() {
return this.shortHash;
}
public String date(){
return this.date;
}
static {
final Path path = getElasticsearchCodebase();
String shortHash = null;
String date = null;
Label_0157: { shortHash = "Unknown"; date = "Unknown";
}
CURRENT = new XPackBuild(shortHash, date);
}
}
5、javac -cp "/home/elk/elasticsearch-6.3.2/lib/elasticsearch-6.3.2.jar:/home/elk/elasticsearch-6.3.2/lib/lucene-core-7.3.1.jar:/home/elk/elasticsearch-6.3.2/modules/x-pack/x-pack-core/x-pack-core-6.3.2.jar:/home/elk/elasticsearch-6.3.2/lib/elasticsearch-core-6.3.2.jar" XPackBuild.java
6、javac -cp "/home/elk/elasticsearch-6.3.2/lib/elasticsearch-6.3.2.jar:/home/elk/elasticsearch-6.3.2/lib/lucene-core-7.3.1.jar:/home/elk/elasticsearch-6.3.2/modules/x-pack/x-pack-core/x-pack-core-6.3.2.jar" LicenseVerifier.java
7、生成的 class文件 覆蓋 /home/tmp/org/elasticsearch/license org/elasticsearch/xpack/core/
8、jar -cf x-pack-core-6.3.2.jar /home/tmp/* (注意不要把之前的多余文件打包進(jìn)去了)
9、cp /home/tmp/x-pack-core-6.3.2.jar /home/elk/elasticsearch-6.3.2/modules/x-pack/x-pack-core/
10、重啟elastic ; 在kibana上傳授權(quán)文件 license.json
{"license":{"uid":"2e44e23c-7087-447b-9a0e-398b8b7a917c","type":"platinum","issue_date_in_millis":1532649600000,"expiry_date_in_millis":2544271999999,"max_nodes":100,"issued_to":"han jiang (www.zfcloud.com)","issuer":"Web Form","signature":"AAAAAwAAAA2elPtByKMPXHGshznoAAABmC9ZN0hjZDBGYnVyRXpCOW5Bb3FjZDAxOWpSbTVoMVZwUzRxVk1PSmkxaktJRVl5MUYvUWh4bHZVUTllbXNPbzBUemtnbWpBbmlWRmRZb25KNFlBR2x0TXc2K2p1Y1VtMG1UQU9TRGZVSGRwaEJGUjE3bXd3LzRqZ05iLzRteWFNekdxRGpIYlFwYkJiNUs0U1hTVlJKNVlXekMrSlVUdFIvV0FNeWdOYnlESDc3MWhlY3hSQmdKSjJ2ZTcvYlBFOHhPQlV3ZHdDQ0tHcG5uOElCaDJ4K1hob29xSG85N0kvTWV3THhlQk9NL01VMFRjNDZpZEVXeUtUMXIyMlIveFpJUkk2WUdveEZaME9XWitGUi9WNTZVQW1FMG1DenhZU0ZmeXlZakVEMjZFT2NvOWxpZGlqVmlHNC8rWVVUYzMwRGVySHpIdURzKzFiRDl4TmM1TUp2VTBOUlJZUlAyV0ZVL2kvVk10L0NsbXNFYVZwT3NSU082dFNNa2prQ0ZsclZ4NTltbU1CVE5lR09Bck93V2J1Y3c9PQAAAQCDbfLHMEJ/Bp4sIDNuTFk9IyxaUaxxxs3/EjU7urcHaU8X9tlxUICA2g4vnIcJ/nPcsZKxfq+j3wriz0DGtL0c4At2tzMEEuIdi1J7hLUxJz1GzQYCfaV84mIHeSeBObaTJF7ic03ef0t8kMztMk17/7/+mJWacqk9GES/wAQfaLzGxxX38sj6rpSG/jMlve7EIFHiGb22jGp8NDGuneooddESvrUth6lrm3tDTPWtM5Vf/RvTUJy4LX3PJsqrgZscx0n0cbXtjDHU4SAyvZ02govNAeZZFMKgmGXnLqpWXJGX3GOeN4I2xxky03NR4mPtPogsoA7EDALcIXFe+wr4","start_date_in_millis":1532649600000}}
11、執(zhí)行命令: /home/elk/elasticsearch-6.3.2/bin/elasticsearch-setup-passwords interactive (設(shè)置密碼)
12、修改 kibana.yml; elasticuser: elasticpasswd: (配置剛剛修改好的用戶密碼)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請(qǐng)聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。