zoukankan      html  css  js  c++  java
  • linux安装elasticsearch

    1 安装jdk

    具体看 http://www.cnblogs.com/php-linux/p/8757783.html

    2 下载最新版的 zip

    https://www.elastic.co/cn/downloads/elasticsearch

    3 解压

    unzip elasticsearch-6.2.3.zip

    4 移动

    mv elasticsearch-6.2.3 /usr/local/es

    5 启动 

    提示不能以root用户执行 

    useradd es  
    passwd es  

    为es用户添加sudo权限

    visudo 

    找到root 复制后改为es

     再次启动

    估计是权限问题 

    sudo chmod 777 -R /usr/local/es

    再启动

     访问 http

     查看ip地址

    访问

    http://192.168.33.30:9200/ 

    提示无法访问

     vim /usr/local/es/config/elasticsearch.yml

     

    再次重启  

    [1]: max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]

    解决:切换到root用户,编辑limits.conf 添加类似如下内容

    vi /etc/security/limits.conf 

    添加如下内容:

    * soft nofile 65536

    * hard nofile 131072

    * soft nproc 2048

    * hard nproc 4096

    [2]: max number of threads [1024] for user [es] is too low, increase to at least [4096]

    解决:切换到root用户,进入limits.d目录下修改配置文件。

    vi /etc/security/limits.d/90-nproc.conf 

    修改如下内容:

    * soft nproc 1024

    #修改为

    * soft nproc 4096

    [3]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

    解决:切换到root用户修改配置sysctl.conf

    vi /etc/sysctl.conf 

    添加下面配置:

    vm.max_map_count=655360

    并执行命令:

    sysctl -p

    [4]: system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk

    问题原因:因为Centos6不支持SecComp,而ES5.2.1默认bootstrap.system_call_filter为true进行检测,所以导致检测失败,失败后直接导致ES不能启动。详见 :https://github.com/elastic/elasticsearch/issues/22899

    解决方法:在elasticsearch.yml中配置bootstrap.system_call_filter为false,注意要在Memory下面:
    bootstrap.memory_lock: false
    bootstrap.system_call_filter: false

    重启es 异常

    ERROR: [1] bootstrap checks failed
    [1]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured
    修改
    elasticsearch.yml
    取消注释保留一个节点
    cluster.initial_master_nodes: ["node-1"]
    这个的话,这里的node-1是上面一个默认的记得打开就可以了

    最终终于启动了

    访问ip 

  • 相关阅读:
    第47课 父子间的冲突
    第46课 继承中的构造与析构
    第45课 不同的继承方式
    3.天线-网络规划-网络优化
    2.多址技术
    断剑重铸013
    断剑重铸012
    断剑重铸011
    1.LTE系统概述
    断剑重铸010
  • 原文地址:https://www.cnblogs.com/brady-wang/p/8758788.html
Copyright © 2011-2022 走看看