zoukankan      html  css  js  c++  java
  • Elasticsearch之shield(权限)插件安装之后的浏览详解

    前期博客

    Elasticsearch-2.4.3的3节点安装(多种方式图文详解)(含 head、kopf、marvel、shield和watcher插件安装和使用)

    访问es:-u es_admin 表示使用用户es_admin进行访问

    复制代码
    [hadoop@HadoopMaster elasticsearch-2.4.3]$ pwd
    /home/hadoop/app/elasticsearch-2.4.3
    [hadoop@HadoopMaster elasticsearch-2.4.3]$ curl -u es_admin -XGET 'http://192.168.80.10:9200/'
    Enter host password for user 'es_admin':
    {
      "name" : "node-0",
      "cluster_name" : "escluster",
      "cluster_uuid" : "gBwdRD7iRRyC6TRji7ohFw",
      "version" : {
        "number" : "2.4.3",
        "build_hash" : "d38a34e7b75af4e17ead16f156feffa432b22be3",
        "build_timestamp" : "2016-12-07T16:28:56Z",
        "build_snapshot" : false,
        "lucene_version" : "5.5.2"
      },
      "tagline" : "You Know, for Search"
    }
    [hadoop@HadoopMaster elasticsearch-2.4.3]$ 
    复制代码
    curl -u es_admin -XGET 'http://localhost:9200/'

    curl -u es_admin -XGET 'http://192.168.80.10:9200/'

     

    [hadoop@HadoopSlave1 elasticsearch-2.4.3]$ pwd
    /home/hadoop/app/elasticsearch-2.4.3
    [hadoop@HadoopSlave1 elasticsearch-2.4.3]$ bin/shield/esusers useradd es_admin -r admin
    Enter new password: 
    Retype new password: 
    [hadoop@HadoopSlave1 elasticsearch-2.4.3]$ curl -u es_admin -XGET 'http://192.168.80.11:9200/'
    Enter host password for user 'es_admin':
    {
      "name" : "node-1",
      "cluster_name" : "escluster",
      "cluster_uuid" : "gBwdRD7iRRyC6TRji7ohFw",
      "version" : {
        "number" : "2.4.3",
        "build_hash" : "d38a34e7b75af4e17ead16f156feffa432b22be3",
        "build_timestamp" : "2016-12-07T16:28:56Z",
        "build_snapshot" : false,
        "lucene_version" : "5.5.2"
      },
      "tagline" : "You Know, for Search"
    }
    [hadoop@HadoopSlave1 elasticsearch-2.4.3]$ 

     

    [hadoop@HadoopSlave2 elasticsearch-2.4.3]$ pwd
    /home/hadoop/app/elasticsearch-2.4.3
    [hadoop@HadoopSlave2 elasticsearch-2.4.3]$ bin/shield/esusers useradd es_admin -r admin
    Enter new password: 
    Retype new password: 
    [hadoop@HadoopSlave2 elasticsearch-2.4.3]$ curl -u es_admin -XGET 'http://192.168.80.12:9200/'
    Enter host password for user 'es_admin':
    {
      "name" : "node-2",
      "cluster_name" : "escluster",
      "cluster_uuid" : "gBwdRD7iRRyC6TRji7ohFw",
      "version" : {
        "number" : "2.4.3",
        "build_hash" : "d38a34e7b75af4e17ead16f156feffa432b22be3",
        "build_timestamp" : "2016-12-07T16:28:56Z",
        "build_snapshot" : false,
        "lucene_version" : "5.5.2"
      },
      "tagline" : "You Know, for Search"
    }
    [hadoop@HadoopSlave2 elasticsearch-2.4.3]$ 

     

      访问的会提示输入刚才设置的密码。(我刚才输入的密码是123456,用户名是es_admin)。

      这样以后再访问es的时候就需要输入用户名和密码了。

  • 相关阅读:
    60款很酷的 jQuery 幻灯片演示和下载
    分享27款非常棒的 jQuery 表单插件
    10款新鲜出炉的 jQuery 插件
    5 个很炫的 HTML5 游戏
    12款高质量的免费 HTML 网页模板下载
    jquery插件整理篇(四)自动补全类插件
    jquery插件整理篇(三)图片展示插件
    超强1000个jquery插件!
    34个漂亮的应用程序后台管理系统界面(系列二)
    jquery插件整理篇(九)数据验证类
  • 原文地址:https://www.cnblogs.com/zlslch/p/6618757.html
Copyright © 2011-2022 走看看