安装elasticsearch+kibana+searchguard
Posted wangfg
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装elasticsearch+kibana+searchguard相关的知识,希望对你有一定的参考价值。
---------------------------------安装es的search-guard------------------------------------------------------------------
1、下载对应的版本并运行安装命令(https://docs.search-guard.com/6.x-25/search-guard-versions)
.inelasticsearch-plugin install -b file:///C:UsersAdministratorDownloadssearch-guard-6-6.8.3-25.5.zip
2、https://downloads.search-guard.com/resources/certificates/certificates.zip下载测试证书解压并放置到es的config目录下
3、修改elasticsearch.yml
--------------------------
xpack.security.enabled: false
searchguard.ssl.transport.pemcert_filepath: esnode.pem
searchguard.ssl.transport.pemkey_filepath: esnode-key.pem
searchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pem
searchguard.ssl.transport.enforce_hostname_verification: false
searchguard.ssl.http.enabled: true
searchguard.ssl.http.pemcert_filepath: esnode.pem
searchguard.ssl.http.pemkey_filepath: esnode-key.pem
searchguard.ssl.http.pemtrustedcas_filepath: root-ca.pem
searchguard.allow_unsafe_democertificates: true
searchguard.allow_default_init_sgindex: true
searchguard.authcz.admin_dn:
- CN=kirk,OU=client,O=client,L=test,C=de
searchguard.enable_snapshot_restore_privilege: true
searchguard.check_snapshot_restore_write_privileges: true
searchguard.restapi.roles_enabled: ["sg_all_access"]
--------------------------
4、启动es访问 https://localhost:9200/ 用户名密码 adminadmin
5、使用sgadmin tool更新应用配置切换到目录pluginssearch-guard-6 ools
执行 .sgadmin.bat -cd ..sgconfig -key ......configkirk-key.pem -cert ......configkirk.pem -cacert ......config oot-ca.pem -nhnv -icl
#.sgadmin.bat -icl -nhnv -cd ..sgconfig -cacert ......config oot-ca.pem -cert ......configkirk.pem -key ......configkirk.key -keypass XtHB8KsoVFhy
6、配置社区版本 ,修改elasticsearch.yml
-----------------------------------
searchguard.enterprise_modules_enabled: false
-----------------------------------
7、校验版本 https://localhost:9200/_searchguard/license
-------------------------------------ssl证书下载以及配置--------------------------------------------------------------------------
1、下载offline TLS tool(https://search.maven.org/search?q=a:search-guard-tlstool)
-------------------------------------安装kibana的search-guard---------------------------------------------------------------------------
1、下载对应的版本并运行安装命令(https://docs.search-guard.com/6.x-25/search-guard-versions)
.inkibana-plugin install file:///C:UsersAdministratorDownloadssearch-guard-kibana-plugin-6.8.3-18.5.zip
2、修改kibana.yml
---------------------------------------
xpack.security.enabled: false
# Use HTTPS instead of HTTP
elasticsearch.hosts: ["https://localhost:9200"]
# Configure the Kibana internal server user
elasticsearch.username: "admin"
elasticsearch.password: "admin"
# Disable SSL verification because we use self-signed demo certificates
elasticsearch.ssl.verificationMode: none
# Whitelist the Search Guard Multi Tenancy Header
elasticsearch.requestHeadersWhitelist: [ "Authorization", "sgtenant" ]
---------------------------------------
3、启动kibana并访问http://localhost:5601/
参考资料
https://github.com/floragunncom/
https://docs.search-guard.com/6.x-25/
https://github.com/liyifan687/Elasticsearch
https://blog.csdn.net/wangkai_123456/article/details/95938714
https://docs.search-guard.com/6.x-25/offline-tls-tool
https://github.com/beshu-tech/readonlyrest-docs/blob/master/elasticsearch.md#rules
https://www.aboutyun.com/forum.php?mod=viewthread&tid=27241&ordertype=1
---------------------------------安装es的search-guard------------------------------------------------------------------
1、下载对应的版本并运行安装命令(https://docs.search-guard.com/6.x-25/search-guard-versions).inelasticsearch-plugin install -b file:///C:UsersAdministratorDownloadssearch-guard-6-6.8.3-25.5.zip
2、https://downloads.search-guard.com/resources/certificates/certificates.zip下载测试证书解压并放置到es的config目录下
3、修改elasticsearch.yml--------------------------xpack.security.enabled: false
searchguard.ssl.transport.pemcert_filepath: esnode.pemsearchguard.ssl.transport.pemkey_filepath: esnode-key.pemsearchguard.ssl.transport.pemtrustedcas_filepath: root-ca.pemsearchguard.ssl.transport.enforce_hostname_verification: falsesearchguard.ssl.http.enabled: truesearchguard.ssl.http.pemcert_filepath: esnode.pemsearchguard.ssl.http.pemkey_filepath: esnode-key.pemsearchguard.ssl.http.pemtrustedcas_filepath: root-ca.pemsearchguard.allow_unsafe_democertificates: truesearchguard.allow_default_init_sgindex: truesearchguard.authcz.admin_dn: - CN=kirk,OU=client,O=client,L=test,C=desearchguard.enable_snapshot_restore_privilege: truesearchguard.check_snapshot_restore_write_privileges: truesearchguard.restapi.roles_enabled: ["sg_all_access"]
--------------------------
4、启动es访问 https://localhost:9200/ 用户名密码 adminadmin
5、使用sgadmin tool更新应用配置切换到目录pluginssearch-guard-6 ools
执行 .sgadmin.bat -cd ..sgconfig -key ......configkirk-key.pem -cert ......configkirk.pem -cacert ......config
oot-ca.pem -nhnv -icl
.sgadmin.bat -icl -nhnv -cd ..sgconfig -cacert ......config
oot-ca.pem -cert ......configkirk.pem -key ......configkirk.key -keypass XtHB8KsoVFhy
6、配置社区版本 ,修改elasticsearch.yml-----------------------------------searchguard.enterprise_modules_enabled: false-----------------------------------7、校验版本 https://localhost:9200/_searchguard/license
-------------------------------------ssl证书下载以及配置--------------------------------------------------------------------------
1、下载offline TLS tool(https://search.maven.org/search?q=a:search-guard-tlstool)
-------------------------------------安装kibana的search-guard---------------------------------------------------------------------------
1、下载对应的版本并运行安装命令(https://docs.search-guard.com/6.x-25/search-guard-versions).inkibana-plugin install file:///C:UsersAdministratorDownloadssearch-guard-kibana-plugin-6.8.3-18.5.zip
2、修改kibana.yml---------------------------------------xpack.security.enabled: false
# Use HTTPS instead of HTTPelasticsearch.hosts: ["https://localhost:9200"]
# Configure the Kibana internal server userelasticsearch.username: "admin"elasticsearch.password: "admin"
# Disable SSL verification because we use self-signed demo certificateselasticsearch.ssl.verificationMode: none
# Whitelist the Search Guard Multi Tenancy Headerelasticsearch.requestHeadersWhitelist: [ "Authorization", "sgtenant" ]---------------------------------------
3、启动kibana并访问http://localhost:5601/
参考资料 https://github.com/floragunncom/https://docs.search-guard.com/6.x-25/https://github.com/liyifan687/Elasticsearchhttps://blog.csdn.net/wangkai_123456/article/details/95938714https://docs.search-guard.com/6.x-25/offline-tls-tool
https://github.com/beshu-tech/readonlyrest-docs/blob/master/elasticsearch.md#ruleshttps://www.aboutyun.com/forum.php?mod=viewthread&tid=27241&ordertype=1
以上是关于安装elasticsearch+kibana+searchguard的主要内容,如果未能解决你的问题,请参考以下文章