填写信息如下图,收取邮件
- Download the zip file
- cd to the Elasticsearch home
- bin/elasticsearch-plugin install file:///download-folder/readonlyrest-1.19.3_es6.2.2.zip
- Edit readonlyrest.yml and add your configuration snippets. Also, refer to the official documentation.
[root@7d2590e1812d elasticsearch]# bin/elasticsearch-plugin install file:///usr/share/elasticsearch/data/readonlyrest-1.19.2_es6.3.2.zip
[root@7d2590e1812d elasticsearch]# vi config/elasticsearch.yml
[root@7d2590e1812d elasticsearch]# vi config/readonlyrest.yml
[root@7d2590e1812d elasticsearch]# cat config/elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
xpack.security.enabled: false
[root@7d2590e1812d elasticsearch]# cat config/readonlyrest.yml
readonlyrest:
access_control_rules:
- name: "Require HTTP Basic Auth"
type: allow
auth_key: username:password