zoukankan      html  css  js  c++  java
  • 初识Elasticsearch


    安装

    es需要Java8 环境,需要首先安装jdk.
    安装完java环境,就可以安装es,直接下载压缩包

    wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.zip
    unzip elasticsearch-5.5.1.zip -d ${install_dir}
    

    启动

    cd ${install_dir}/elasticsearch-5.5.1/ 
    ./bin/elasticsearch
    

    如果这时候报错 error='Cannot allocate memory', 是因为elasticsearch5.0默认分配jvm空间大小为2g,需要改小一点

    vim config/jvm.options
    -Xms512m
    -Xmx512m
    

    如果你使用root用户启动,则此时会报错'org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root'

    adduser ${user_name}
    passwd ${user_name}
    whereis sudoers
    ls -l /etc/sudoers
    chmod -v u+w /etc/sudoers
    vim /etc/sudoers
    ${user_name}    ALL=(ALL)       ALL
    chmod -v u-w /etc/sudoers
    # 添加到root组
    usermod -G root ${user_name}
    su ${user_name}
    
  • 相关阅读:
    堆排序优先级队列
    贪心算法装载问题
    贪心算法最小生成树
    贪心算法活动安排
    回文质数
    堆排序算法
    递归算法排列问题
    排序算法
    贪心算法Dijkstra
    贪心算法哈夫曼编码
  • 原文地址:https://www.cnblogs.com/lwmp/p/13174461.html
Copyright © 2011-2022 走看看