readonlyrest插件安装配置

一、下载

  • 版本需要与ES版本对应,这里以6.2.2版本为例

https://readonlyrest.com/download/
在这里插入图片描述

  • 按照收到的邮件提示下载
    在这里插入图片描述

二、安装

/usr/share/elasticsearch/bin/elasticsearch-plugin install file:///root/readonlyrest-1.18.9_es6.2.2.zip

在这里插入图片描述

三、配置文件

  • auth_key:用户名:密码
cat > /etc/elasticsearch/readonlyrest.yml <<EOF
readonlyrest:
  enable: true
  response_if_req_forbidden: Sorry, your request is forbidden.
  access_control_rules:
  - name: Full access with HTTP auth
    auth_key: admin:123456
    type: allow
EOF

修改完毕需要重启ES使插件生效

四、验证

在这里插入图片描述

原创文章 91 获赞 183 访问量 59万+

猜你喜欢

转载自blog.csdn.net/ywd1992/article/details/103635807
今日推荐