• 安装ES6及HEAD插件


    1.下载相应npm包

    es6地址:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-6-2-2
    head插件地址:https://github.com/mobz/elasticsearch-head/

    2.安装ES

    #yum install elasticsearch-6.2.2.rpm

    2.1 修改ES配置文件

    # egrep -v "^#|^$" elasticsearch.yml
    cluster.name: elk6 #集群名字
    node.name: "elk-a1" #节点名字
    node.master: true #主节点
    node.data: true
    discovery.zen.ping.unicast.hosts: ["192.168.x.x"]
    discovery.zen.fd.ping_timeout: 60s
    discovery.zen.fd.ping_retries: 5
    indices.fielddata.cache.size: 40%
    bootstrap.system_call_filter: false
    http.cors.enabled: true #允许插件
    http.cors.allow-origin: "*"
    path.data: /xx/elasticsearch #数据目录
    path.logs: /var/log/elasticsearch #日志目录
    network.host: 0.0.0.0

    2.2 启动ES

    ES6依赖jdk1.8,并且ulimit要大于65535,数据目录权限需要是elasticsearch
    修改ulimit

    #vim /etc/security/limits.conf
    * soft nofile 65536
    * hard nofile 65536
    chown -R elasticsearch.elasticsearch /xx/elasticsearch
    service elasticsearch start

    3.安装head插件

    3.1 安装nodejs

    #  curl --silent --location https://rpm.nodesource.com/setup_5.x | bash -
    # yum install -y nodejs

    3.2 安装npm

    # yum install npm

    3.3 通过npm安装grunt

    # npm install -g grunt-cli --registry=https://registry.npm.taobao.org

    3.4 确认版本

    `# node -v
    v0.10.48
    # npm -v
    1.3.6
    # grunt --version
    grunt-cli v1.3.1`

    3.5 下载head插件

    # wget https://github.com/mobz/elasticsearch-head/archive/master.zip
    # unzip master.zip
    # mv elasticsearch-head-master/ /usr/local

    3.6 安装head插件

    # cd /usr/local/elasticsearch-head-master/
    # npm install --registry=https://registry.npm.taobao.org
    # 修改Head插件配置文件
    # vim Gruntfile.js 
    # 找到connect:server,添加hostname一项,如下
    connect: {
    server: {
    options: {
    hostname: '0.0.0.0',
    port: 9100,
    base: '.',
    keepalive: true
    }
    }


    3.7 启动head插件

    # nohup npm run start &

    3.8 浏览器观察效果

    访问:http://192.168.XX.XX:9100/

    若显示未连接,将localhost改成IP,点击连接即可

    4 安装ik插件

    https://github.com/medcl/elasticsearch-analysis-ik/

  • 相关阅读:
    做一个项目什么最重要(代码部分最多占40%)
    二叉树遍历:已知前序和中序,求后序
    [每日一题] OCP1z0-047 :2013-08-24 FLASHBACK—TABLE/PRIMARY KEY(FOREIGN KEY?)......98
    商业价值:苹果iTV,再一次改变世界?
    Nginx负载均衡简易方法
    Qt之设置窗口背景
    python mongodb ubuntu
    生物-生理-衰老:百科
    C#基础:线程之异步回调(委托)
    C#:同步调用、异步调用、异步回调
  • 原文地址:https://www.cnblogs.com/aresxin/p/an-zhuangES6jiHEAD-cha-jian.html
Copyright © 2020-2023  润新知