1.Linux下安装shield步骤
- cd /opt/soft/elk/elasticsearch-2.4.6
- bin/plugin install license 先安装license (第一次安装失败,重试即可)
- bin/plugin install shield 安装shield插件
- 重启es
- 添加用户,设置密码
- cd /opt/soft/elk/elasticsearch-2.4.6
- bin/shield/esusers useradd esfgroup -r admin 然后输入密码即可
- 安装成功
- 添加用户,设置密码
- bin/shield/esusers list 查看当前用户列表
- bin/shield/esusers userdel esfgroup 删除用户
- bin/plugin remove shield 设置用户后想取消,仅删除用户是不够的,还需要卸载shield插件和license插件(bin/plugin remove license)(shield插件只有30天试用期,30天试用期过后,账号密码功能依然可用,且在RPC java服务里shield依然可以使用,详情参考 https://www.elastic.co/guide/en/shield/current/license-management.html)
2.请求示例
- head请求 带密码访问