zoukankan      html  css  js  c++  java
  • Elasticsearch的安装和使用

    Elasticsearch的安装和使用

    Elasticsearch的下载

    下载地址:https://www.elastic.co/downloads/elasticsearch

    环境准备:

    1. 安装jdk
    2. 修改系统配置

    echo "fs.file-max = 1000000" >> /etc/sysctl.conf

    echo “fs.nr_open=6553501” >> /etc/sysctl.conf
    echo "vm.max_map_count=262144" >> /etc/sysctl.conf
    echo "vm.swappiness = 1" >> /etc/sysctl.conf

    sysctl -p
    sed -i 's/* soft nofile 65535/* soft nofile 655350/g' /etc/security/limits.conf
    sed -i 's/* hard nofile 65535/* hard nofile 655350/g' /etc/security/limits.conf

    修改es配置:config/elasticsearch.yml

    [elasticsearch@es01 elasticsearch-5.6.3]$ egrep -v '^#|^$' config/elasticsearch.yml

    node.name: es01

    network.host: 0.0.0.0

    http.port: 9200

    配置内存的使用:

    Config/jvm.properties

    elasticsearch不能在root下运行,需要添加用户

    useradd elasticsearch

    su elasticsearch

    bin/elasticsearch –d

    验证是否ok

    本地集群模式启动

    [elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=7200 -Epath.data=es01

    [elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=8200 -Epath.data=es02

    [elasticsearch@es01 elasticsearch-5.6.3]$ bin/elasticsearch -Ehttp.port=7200 -Epath.data=es03

  • 相关阅读:
    SQL补充
    SQL练习题
    HDU 2907
    Codeforces 814D
    Codeforces 814C
    Codeforces 1004D
    Codeforces 1004E
    CodeForces 909F
    CodeForces 909E
    CodeForces 909D
  • 原文地址:https://www.cnblogs.com/reblue520/p/10862671.html
Copyright © 2011-2022 走看看