安装elasticsearch+kibana+searchguard

---------------------------------安装es的search-guard------------------------------------------------------------------

1、下载对应的版本并运行安装命令(https://docs.search-guard.com/6.x-25/search-guard-versions)

.\bin\elasticsearch-plugin install -b file:///C:\Users\Administrator\Downloads\search-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/  用户名密码 admin\admin

5、使用sgadmin tool更新应用配置切换到目录plugins\search-guard-6\tools

执行 .\sgadmin.bat -cd ..\sgconfig -key ..\..\..\config\kirk-key.pem -cert ..\..\..\config\kirk.pem -cacert ..\..\..\config\root-ca.pem -nhnv -icl

#.\sgadmin.bat -icl -nhnv -cd ..\sgconfig -cacert ..\..\..\config\root-ca.pem -cert ..\..\..\config\kirk.pem -key ..\..\..\config\kirk.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)

.\bin\kibana-plugin install file:///C:\Users\Administrator\Downloads\search-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).\bin\elasticsearch-plugin install -b file:///C:\Users\Administrator\Downloads\search-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/  用户名密码 admin\admin

5、使用sgadmin tool更新应用配置切换到目录plugins\search-guard-6\tools
执行 .\sgadmin.bat -cd ..\sgconfig -key ..\..\..\config\kirk-key.pem -cert ..\..\..\config\kirk.pem -cacert ..\..\..\config\root-ca.pem -nhnv -icl
.\sgadmin.bat -icl -nhnv -cd ..\sgconfig -cacert ..\..\..\config\root-ca.pem -cert ..\..\..\config\kirk.pem -key ..\..\..\config\kirk.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).\bin\kibana-plugin install file:///C:\Users\Administrator\Downloads\search-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




猜你喜欢

转载自www.cnblogs.com/wangfg/p/11824513.html