zoukankan      html  css  js  c++  java
  • 一、ES在CentOS7下安装问题

    当前版本是CenOS7.6:

    java环境是jdk11:

    ES用的是7.10.1

    ES在启动时候报错:

    ElasticsearchException[Failure running machine learning native code. This could be due to running on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory.

    编辑/config/elasticsearch.yml文件,文件最后追加xpack.ml.enabled: false。注意“:”后有空格。

    启动成功,访问9200:

    我们使用curl访问本机的es服务,es默认不可对外访问,需要开启远程访问权限,在/conf/elasticsearch.yml里把network.host:192.168.0.1修改为0.0.0.0

     设置远程连接后启动报错:

     ERROR【1】原因是es认为开启远程控制后,系统默认值不足以es使用,需要提升系统的配置值用于es使用

    用root用户打开配置文件 vim /etc/security/limits.conf,在最下面追加:

     *是指全部用户生效

    *               soft    nofile          65536
    *               hard    nofile          65536
    *               soft    nproc           4096
    *               hard    nproc           4096
    

    用root用户身份:vim /etc/security/limits.d/20-nproc.conf

     

    将*所有用户改成使用es的用户motorye

     ERROR【2】 用root用户身份:vim /etc/sysctl.conf  添加vm.max_map_count=655360

     

     ERROR【3】编辑elasticsearch.yml,添加:cluster.initial_master_nodes: ["你当前主机名"],图片上的"node-1"在我当前主机应该是"motorye6"

    启动成功:

     浏览器访问9200:

  • 相关阅读:
    UML箭头含义整理
    协变返回类型
    Thymeleaf取出model中的数据
    宝塔面板中的mysql查看密码问题
    宝塔面板如何登录
    mysql查看数据库、表的基本语句
    springboot拦截器实例
    Thymeleaf中的fragments学习
    食物链
    银河英雄传说
  • 原文地址:https://www.cnblogs.com/motorye/p/14152760.html
Copyright © 2011-2022 走看看