• Elasticsearch 安装


    1、下载 最新版的 Elasticsearch (elasticsearch-6.2.0.tar.gz) 到 /usr/local/src 目录下

    2、解压缩到当前文件夹    【tar -zxvf elasticsearch-6.2.0.tar.gz】

    3、移动到 /usr/local 目录下   【mv elasticsearch-6.2.0 ../】

    4、将命令添加到环境变量     【vi /etc/profile】

    5、最后添加

    export JAVA_HOME=/usr/jdk1.8.0_60

    export JRE_HOME=$JAVA_HOME/jre

    export ELASTICSEARCH_HOME=/usr/local/elasticsearch-6.2.0

    export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$ELASTICSEARCH_HOME/bin:$PATH

    6、修改 /usr/local/elasticsearch-6.2.0/config/elasticsearch.yml

    cluster.name: my-application

    node.name: node-1

    network.host: 0.0.0.0

    http.port: 9200

    node.max_local_storage_nodes: 2

    可能遇到异常

    1、failed to obtain node locks, tried [[/elasticsearch-5.4.0/data/elasticsearch]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])

     /usr/local/elasticsearch-6.2.0/config/elasticsearch.yml  配置文件最后添加  node.max_local_storage_nodes: 2

    2、can not run elasticsearch as root

    useradd elasticsearch

    chown -R elasticsearch:elasticsearch /usr/local/elasticsearch-6.2.0

    su elasticsearch

    sh /usr/local/elasticsearch-6.2.0/bin/elasticsearch -d

    3、main ERROR No log4j2 configuration file found. Using default configuration: logging only errors to the console

    node.max_local_storage_nodes: 2

    请尽量保持冒号前面没空格,后面一个空格,不要用tab键

  • 相关阅读:
    java-connect-mysql
    搜索框提示列表问题
    方法中的函数会掩盖this,解决办法!
    关于W3C盒子布局
    将类数组转化成数组
    js获取元素宽高
    使用gulp添加版本号
    flex布局
    排序-冒泡排序
    js事件、自定义dom事件、自定义事件
  • 原文地址:https://www.cnblogs.com/tq1226112215/p/8435127.html
Copyright © 2020-2023  润新知