• 一、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:

  • 相关阅读:
    根据不同运行环境配置和组织node.js应用
    python下pip使用bug汇总
    python的虚拟环境
    nginx使用手册--nginx的命令行参数
    nginx使用手册--nginx.conf文件配置详解
    使用async读取异步数据
    [Bootstrap]组件(三)
    [Bootstrap]组件(二)
    [Bootstrap]组件(一)
    [javascript|基本概念|一元操作符]学习笔记
  • 原文地址:https://www.cnblogs.com/motorye/p/14152760.html
Copyright © 2020-2023  润新知