1、升級(jí)原因
log4j低版本存在嚴(yán)重漏洞,根據(jù)需要升級(jí)到安全版本,不一定是最新。
log4j-2.17.1 jar包下載地址https://archive.apache.org/dist/logging/log4j/2.17.1/
2、下載后解壓apache-log4j-2.17.1-bin.tar.gz
升級(jí)需要用到截圖中四個(gè)jar包
3、升級(jí)
刪除舊版本log4j
進(jìn)入elasticsearch-7.13.3目錄
$ rm -rf lib/log4j-core-2.11.1.jar
$ rm -rf lib/log4j-api-2.11.1.jar
$ rm -rf modules/x-pack-identity-provider/log4j-slf4j-impl-2.11.1.jar
$ rm -rf modules/repository-url/log4j-1.2-api-2.11.1.jar
$ rm -rf modules/x-pack-core/log4j-1.2-api-2.11.1.jar
$ rm -rf modules/x-pack-security/log4j-slf4j-impl-2.11.1.jar文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-663418.html
4、將需要升級(jí)的包拷貝到對(duì)應(yīng)目錄
$ cp log4j-core-2.17.1.jar /home/elk/elasticsearch-7.13.3/lib/
$ cp /log4j-api-2.17.1.jar /home/elk/elasticsearch-7.13.3/lib
$ cp log4j-slf4j-impl-2.17.1.jar /home/elk/elasticsearch-7.13.3/modules/x-pack-identity-provider/
$ cp log4j-1.2-api-2.17.1.jar /home/elk/elasticsearch-7.13.3/modules/repository-url/
$ cp log4j-1.2-api-2.17.1.jar /home/elk/elasticsearch-7.13.3/modules/x-pack-core/
$ cp log4j-slf4j-impl-2.17.1.jar /home/elk/elasticsearch-7.13.3/modules/x-pack-security/
5、重新啟動(dòng)elasticsearch服務(wù)文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-663418.html
到了這里,關(guān)于elasticsearch-7.13.3 升級(jí)log4j 到log4j-2.17.1的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!