Elasticsearch安装Readonlyrest插件

  1. 下载插件(填写es版本及自己邮箱)
    https://readonlyrest.com/download/
    
  2. 进入到es的安装目录下bin文件夹
    cd elasticsearch/bin
    
  3. 执行命令安装wins插件
    elasticsearch-plugin install file:///D:/tools/liferay/linux/readonlyrest-1.30.1_es7.6.2.zip
    
  4. 执行命令安装linux插件
    ./elasticsearch-plugin install file:///home/appadmin/liferay/readonlyrest-1.30.1_es7.6.2.zip
    
  5. 卸载插件
    elasticsearch-plugin remove readonlyrest
    
  6. 查看已经安装的所有插件
    elasticsearch-plugin list
    
  7. 在elasticsearch/config目录中新建readonlyrest.yml (与elasticsearch.yml同级目录中)
    # readonlyrest.yml 内容如下
    readonlyrest:
      enable: true
      response_if_req_forbidden: Sorry, your request is forbidden.
      access_control_rules:
      - name: "Accept all request for logstash and kibana grafana"
        type: allow
        auth_key: admin:123456
      - name: "Require HTTP Basic Auth"
        type: allow
        auth_key: connector:connectorpwd
      - name: "Accept read only user"
        auth_key: reader:readerpwd
        actions: ["indices:data/read/*"]
    
  8. 禁用xpack安全设置,elasticsearch.yml文件末尾添加配置 (否则启动会报错)
    # config xpack
    xpack.security.enabled: false
    
  9. 查看es运行状态
    curl --basic -u admin:123456  http://localhost:9200/_cat/health?v
    
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值